-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6ecbd7
commit 397a144
Showing
9 changed files
with
79 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/OmitContentFromException/OmitContentFromException.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net6</TargetFramework> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" /> | ||
<PackageReference Include="Xunit" Version="2.4.1" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" /> | ||
<PackageReference Include="ProjectDefaults" Version="1.0.62" PrivateAssets="all" /> | ||
<ProjectReference Include="..\Verify.Xunit\Verify.Xunit.csproj" /> | ||
<ProjectReference Include="..\Verify\Verify.csproj" /> | ||
</ItemGroup> | ||
<Import Project="$(ProjectDir)..\Verify\buildTransitive\Verify.props" /> | ||
<Import Project="$(ProjectDir)..\Verify\buildTransitive\Verify.targets" /> | ||
<Import Project="$(ProjectDir)..\Verify.Xunit\buildTransitive\Verify.Xunit.props" /> | ||
</Project> |
4 changes: 4 additions & 0 deletions
4
src/OmitContentFromException/OmitContentFromExceptionTests.String.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Results do not match. | ||
Differences: | ||
Received: OmitContentFromExceptionTests.String.received.txt | ||
Verified: OmitContentFromExceptionTests.String.verified.txt |
22 changes: 22 additions & 0 deletions
22
src/OmitContentFromException/OmitContentFromExceptionTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[UsesVerify] | ||
public class OmitContentFromExceptionTests | ||
{ | ||
static OmitContentFromExceptionTests() | ||
{ | ||
VerifierSettings.OmitContentFromException(); | ||
VerifierSettings.DisableRequireUniquePrefix(); | ||
} | ||
|
||
[Fact] | ||
public async Task String() | ||
{ | ||
try | ||
{ | ||
await Verifier.Verify("Foo").DisableDiff(); | ||
} | ||
catch (Exception exception) | ||
{ | ||
await Verifier.Verify(exception.Message).ScrubLinesContaining("DiffEngineTray"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace VerifyTests; | ||
|
||
public static partial class VerifierSettings | ||
{ | ||
internal static bool omitContentFromException; | ||
|
||
public static void OmitContentFromException() | ||
{ | ||
omitContentFromException = true; | ||
} | ||
} |