Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed May 11, 2024
1 parent 582348c commit 8a443f7
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 25 deletions.
8 changes: 1 addition & 7 deletions src/ApprovalTests/Approvers/FileApprover.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using ApprovalTests.Core.Exceptions;
using EmptyFiles;

namespace ApprovalTests.Approvers;

public class FileApprover(IApprovalWriter writer, IApprovalNamer namer, bool normalizeLineEndingsForTextFiles = false)
Expand Down Expand Up @@ -46,10 +43,7 @@ public virtual ApprovalException Approve(string approvedPath, string receivedPat
null;
}

public void Fail()
{
throw failure;
}
public void Fail() => throw failure;

public void ReportFailure(IApprovalFailureReporter reporter)
{
Expand Down
5 changes: 4 additions & 1 deletion src/ApprovalTests/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
global using System.Text;
global using System.Text.RegularExpressions;
global using ApprovalTests.Core;
global using ApprovalTests.Core.Exceptions;
global using ApprovalTests.Namers.StackTraceParsers;
global using ApprovalTests.Scrubber;
global using ApprovalTests.StackTraceParsers;
global using ApprovalTests.Utilities;
global using ApprovalUtilities.Utilities;
global using ApprovalUtilities.Utilities;
global using EmptyFiles;
2 changes: 0 additions & 2 deletions src/ApprovalTests/Namers/UnitTestFrameworkNamer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using ApprovalTests.Namers.StackTraceParsers;

namespace ApprovalTests.Namers;

public class UnitTestFrameworkNamer : IApprovalNamer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using ApprovalTests.Namers.StackTraceParsers;
using ApprovalUtilities.CallStack;

namespace ApprovalTests.StackTraceParsers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using ApprovalTests.Namers.StackTraceParsers;

namespace ApprovalTests.StackTraceParsers;

public class MsTestDataTestMethodStackTraceParser : AttributeStackTraceParser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using ApprovalTests.Namers.StackTraceParsers;

namespace ApprovalTests.StackTraceParsers;

public class NUnitStackTraceParser : AttributeStackTraceParser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using ApprovalTests.Namers.StackTraceParsers;

namespace ApprovalTests.StackTraceParsers;

public class VSStackTraceParser : AttributeStackTraceParser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace ApprovalTests.Namers.UnitTestFrameworks;

using StackTraceParsers;

public class XUnit2TheoryStackTraceParser : AttributeStackTraceParser
{
public const string TheoryAttribute = "Xunit.TheoryAttribute";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using ApprovalTests.Namers.StackTraceParsers;

namespace ApprovalTests.StackTraceParsers;

public class XUnitStackTraceParser : AttributeStackTraceParser
Expand Down
5 changes: 1 addition & 4 deletions src/ApprovalTests/Reporters/TestFrameworks/AssertReporter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using ApprovalTests.Namers.StackTraceParsers;
using EmptyFiles;

namespace ApprovalTests.Reporters.TestFrameworks;
namespace ApprovalTests.Reporters.TestFrameworks;

public class AssertReporter(string assertClass, string areEqual, string frameworkAttribute)
: IEnvironmentAwareReporter
Expand Down

0 comments on commit 8a443f7

Please sign in to comment.