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 e0ad2ae commit 582348c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions src/ApprovalTests/Reporters/TestFrameworks/NUnit3Reporter.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
namespace ApprovalTests.Reporters.TestFrameworks;

public class NUnit3Reporter : AssertReporter
public class NUnit3Reporter() :
AssertReporter(
"NUnit.Framework.Assert, nunit.framework",
"AreEqual",
NUnitStackTraceParser.Attribute)
{
public readonly static NUnit3Reporter INSTANCE = new();

public NUnit3Reporter()
: base("NUnit.Framework.Assert, nunit.framework", "AreEqual", NUnitStackTraceParser.Attribute)
{
}
}
11 changes: 5 additions & 6 deletions src/ApprovalTests/Reporters/TestFrameworks/NUnit4Reporter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
namespace ApprovalTests.Reporters.TestFrameworks;

public class NUnit4Reporter : AssertReporter
public class NUnit4Reporter() :
AssertReporter(
"NUnit.Framework.Legacy.ClassicAssert, nunit.framework.legacy",
"AreEqual",
NUnitStackTraceParser.Attribute)
{
public readonly static NUnit4Reporter INSTANCE = new();
static readonly Lazy<bool> isNUnit4 = new(IsisNUnit4);
Expand All @@ -19,9 +23,4 @@ static bool IsisNUnit4()

public override bool IsWorkingInThisEnvironment(string forFile) =>
base.IsWorkingInThisEnvironment(forFile) && isNUnit4.Value;

public NUnit4Reporter()
: base("NUnit.Framework.Legacy.ClassicAssert, nunit.framework.legacy", "AreEqual", NUnitStackTraceParser.Attribute)
{
}
}

0 comments on commit 582348c

Please sign in to comment.