Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed May 11, 2024
1 parent 3a24d07 commit e904407
Show file tree
Hide file tree
Showing 23 changed files with 4 additions and 527 deletions.
25 changes: 2 additions & 23 deletions docs/ApprovalTests/Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,7 @@ var actual = header.MakeHeading("I am ten chars");
var expected = "";
Approvals.AssertText(expected, actual);
```
<sup><a href='/src/ApprovalTests.NUnit3/Reporters/InlineTextReporterTest.cs#L45-L50' title='Snippet source file'>snippet source</a> | <a href='#snippet-assert_text_before' title='Start of snippet'>anchor</a></sup>
<a id='snippet-assert_text_before-1'></a>
```cs
var header = new Header();
var actual = header.MakeHeading("I am ten chars");
var expected = "";
Approvals.AssertText(expected, actual);
```
<sup><a href='/src/ApprovalTests.Tests/Reporters/InlineTextReporterTest.cs#L45-L50' title='Snippet source file'>snippet source</a> | <a href='#snippet-assert_text_before-1' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/ApprovalTests.Tests/Reporters/InlineTextReporterTest.cs#L45-L50' title='Snippet source file'>snippet source</a> | <a href='#snippet-assert_text_before' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

When you do this, it will copy the c# for the `.received.` to your clipboard, so you can paste it in-line.
Expand All @@ -61,20 +53,7 @@ var expected = new[]{
};
Approvals.AssertText(expected, actual);
```
<sup><a href='/src/ApprovalTests.NUnit3/Reporters/InlineTextReporterTest.cs#L30-L40' title='Snippet source file'>snippet source</a> | <a href='#snippet-assert_text' title='Start of snippet'>anchor</a></sup>
<a id='snippet-assert_text-1'></a>
```cs
var header = new Header();
var actual = header.MakeHeading("I am ten chars");
var expected = new[]{
"**************",
"I am ten chars",
"**************",

};
Approvals.AssertText(expected, actual);
```
<sup><a href='/src/ApprovalTests.Tests/Reporters/InlineTextReporterTest.cs#L30-L40' title='Snippet source file'>snippet source</a> | <a href='#snippet-assert_text-1' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/ApprovalTests.Tests/Reporters/InlineTextReporterTest.cs#L30-L40' title='Snippet source file'>snippet source</a> | <a href='#snippet-assert_text' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down
28 changes: 1 addition & 27 deletions docs/ApprovalTests/howtos/CustomizingDiffToolSelectionOrder.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,33 +44,7 @@ public class CustomDiffReporter :
}
}
```
<sup><a href='/src/ApprovalTests.NUnit3/Reporters/CustomDiffReporter.cs#L1-L22' title='Snippet source file'>snippet source</a> | <a href='#snippet-CustomDiffReporter.cs' title='Start of snippet'>anchor</a></sup>
<a id='snippet-CustomDiffReporter.cs-1'></a>
```cs
using ApprovalTests.Reporters.TestFrameworks;

public class CustomDiffReporter :
FirstWorkingReporter
{
public CustomDiffReporter()
: base(
//TODO: re-order or remove as required
BeyondCompareReporter.INSTANCE,
TortoiseDiffReporter.INSTANCE,
AraxisMergeReporter.INSTANCE,
P4MergeReporter.INSTANCE,
WinMergeReporter.INSTANCE,
KDiff3Reporter.INSTANCE,
VisualStudioReporter.INSTANCE,
RiderReporter.INSTANCE,
FrameworkAssertReporter.INSTANCE,
QuietReporter.INSTANCE
)
{
}
}
```
<sup><a href='/src/ApprovalTests.Tests/Reporters/CustomDiffReporter.cs#L1-L22' title='Snippet source file'>snippet source</a> | <a href='#snippet-CustomDiffReporter.cs-1' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/ApprovalTests.Tests/Reporters/CustomDiffReporter.cs#L1-L22' title='Snippet source file'>snippet source</a> | <a href='#snippet-CustomDiffReporter.cs' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

You can also override the default order while using `DiffReporter` by defining `DiffEngine_ToolOrder` environment variable. The value of that variable should contain a delimiter (`,`, `|`, ` `) separated list of the diff tool names in the desired order. More details about that in [Diff Tool Order](https://github.com/VerifyTests/DiffEngine/blob/main/docs/diff-tool.order.md)
Expand Down
25 changes: 1 addition & 24 deletions src/ApprovalTests.NUnit3/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
global using System.Diagnostics;
global using System.Globalization;
global using System.Net;
global using System.Runtime.CompilerServices;
global using ApprovalTests;
global using ApprovalTests.Approvers;
global using ApprovalTests.Combinations;
global using ApprovalTests.Core;
global using ApprovalTests.Core.Exceptions;
global using ApprovalTests.Email;
global using ApprovalTests.Events;
global using ApprovalTests.ExceptionalExceptions;
global using ApprovalTests.Maintenance;
global using ApprovalTests.Namers;
global using ApprovalTests.Namers.StackTraceParsers;
global using ApprovalTests;
global using ApprovalTests.Reporters;
global using ApprovalTests.Scrubber;
global using ApprovalTests.Utilities;
global using ApprovalTests.WindowsRegistry;
global using ApprovalUtilities.Persistence;
global using ApprovalUtilities.SimpleLogger;
global using ApprovalUtilities.Utilities;
global using iText.Kernel.Pdf;
global using iText.Layout;
global using iText.Layout.Element;
global using NUnit.Framework;
12 changes: 0 additions & 12 deletions src/ApprovalTests.NUnit3/Reporters/AssemblyLevelTest.cs

This file was deleted.

22 changes: 0 additions & 22 deletions src/ApprovalTests.NUnit3/Reporters/CustomDiffReporter.cs

This file was deleted.

This file was deleted.

72 changes: 0 additions & 72 deletions src/ApprovalTests.NUnit3/Reporters/FirstWorkingReporterTest.cs

This file was deleted.

This file was deleted.

64 changes: 0 additions & 64 deletions src/ApprovalTests.NUnit3/Reporters/InlineTextReporterTest.cs

This file was deleted.

This file was deleted.

This file was deleted.

27 changes: 0 additions & 27 deletions src/ApprovalTests.NUnit3/Reporters/MultiReporterTest.cs

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions src/ApprovalTests.NUnit3/Reporters/RecordingReporter.cs

This file was deleted.

0 comments on commit e904407

Please sign in to comment.