Skip to content

Commit

Permalink
Fix MsTest VerifyFile (#1226)
Browse files Browse the repository at this point in the history
* Create BaseClassTests.cs

* .
  • Loading branch information
SimonCropp authored Jun 14, 2024
1 parent 0e1d2f3 commit f7419e6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/Verify.MSTest.Tests/BaseClassTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[TestClass]
public class BaseClassTests : VerifyBase
{
[TestMethod]
public async Task VerifyFileTest() =>
await VerifyFile(path: Path.GetFullPath("sample.png"));
}
4 changes: 2 additions & 2 deletions src/Verify.MSTest/VerifyBase_File.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public SettingsTask VerifyFile(
VerifySettings? settings = null,
object? info = null,
[CallerFilePath] string sourceFile = "") =>
Verifier.VerifyFile(path, settings, info, sourceFile);
Verifier.VerifyFile(path, settings, info, null, sourceFile);

/// <summary>
/// Verifies the contents of <paramref name="path" />.
Expand All @@ -25,5 +25,5 @@ public SettingsTask VerifyFile(
VerifySettings? settings = null,
object? info = null,
[CallerFilePath] string sourceFile = "") =>
Verifier.VerifyFile(path, settings, info, sourceFile);
Verifier.VerifyFile(path, settings, info, null, sourceFile);
}
4 changes: 2 additions & 2 deletions src/Verify.Xunit/VerifyBase_File.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public SettingsTask VerifyFile(
string path,
VerifySettings? settings = null,
object? info = null) =>
Verifier.VerifyFile(path, settings ?? this.settings, info, sourceFile);
Verifier.VerifyFile(path, settings ?? this.settings, info, null, sourceFile);

/// <summary>
/// Verifies the contents of <paramref name="path" />.
Expand All @@ -21,5 +21,5 @@ public SettingsTask VerifyFile(
FileInfo path,
VerifySettings? settings = null,
object? info = null) =>
Verifier.VerifyFile(path, settings ?? this.settings, info, sourceFile);
Verifier.VerifyFile(path, settings ?? this.settings, info, null, sourceFile);
}

0 comments on commit f7419e6

Please sign in to comment.