Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jun 13, 2024
1 parent f5fbdc3 commit 466802c
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/explicit-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public Task WithTargets() =>
name: "targetName")
]);
```
<sup><a href='/src/Verify.MSTest.Tests/Tests.cs#L129-L146' title='Snippet source file'>snippet source</a> | <a href='#snippet-ExplicitTargetsMsTest' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.MSTest.Tests/Tests.cs#L131-L148' title='Snippet source file'>snippet source</a> | <a href='#snippet-ExplicitTargetsMsTest' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down
2 changes: 1 addition & 1 deletion docs/naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ Verifier.DerivePathInfo(
typeName: type.Name,
methodName: method.Name));
```
<sup><a href='/src/Verify.MSTest.Tests/Tests.cs#L10-L18' title='Snippet source file'>snippet source</a> | <a href='#snippet-DerivePathInfoMSTest' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Verify.MSTest.Tests/Tests.cs#L11-L19' title='Snippet source file'>snippet source</a> | <a href='#snippet-DerivePathInfoMSTest' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/Verify.MSTest.Tests/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,23 @@ public Task WithZip() =>
VerifyZip(zipPath);

#endregion

[TestMethod]
public Task VerifyFileWithRelativePath() =>
VerifyFile("sample.png");

[TestMethod]
public Task VerifyFileWithFullPath()
{
var fullPath = Path.GetFullPath("sample.png");
return VerifyFile(fullPath);
}

[TestMethod]
public Task VerifyFileWithFullPathAndUseFileName()
{
var fullPath = Path.GetFullPath("sample.png");
return VerifyFile(fullPath)
.UseFileName("customFileName");
}
}
7 changes: 7 additions & 0 deletions src/Verify.MSTest.Tests/Verify.MSTest.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<ItemGroup>
<PackageReference Include="MSTest" />
<PackageReference Include="ProjectDefaults" PrivateAssets="all" />
<None Update="sample*.*" CopyToOutputDirectory="PreserveNewest" />

<ProjectReference Include="..\TargetLibrary\TargetLibrary.csproj" />
<ProjectReference Include="..\Verify.MSTest\Verify.MSTest.csproj" />
Expand All @@ -22,6 +23,12 @@
<Reference Include="System.IO.Compression" />
</ItemGroup>

<ItemGroup>
<None Update="sample.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<Import Project="$(ProjectDir)..\Verify\buildTransitive\Verify.props" />
<Import Project="$(ProjectDir)..\Verify\buildTransitive\Verify.targets" />
<Import Project="$(ProjectDir)..\Verify.MSTest\buildTransitive\Verify.MSTest.props" />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Verify.MSTest.Tests/sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 466802c

Please sign in to comment.