From 582348c4bf7366442ccac4c2a94339c82b154e60 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Sat, 11 May 2024 20:02:32 +1000 Subject: [PATCH] cleanup --- .../Reporters/TestFrameworks/NUnit3Reporter.cs | 11 +++++------ .../Reporters/TestFrameworks/NUnit4Reporter.cs | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/ApprovalTests/Reporters/TestFrameworks/NUnit3Reporter.cs b/src/ApprovalTests/Reporters/TestFrameworks/NUnit3Reporter.cs index ea31a9c9..7312d028 100644 --- a/src/ApprovalTests/Reporters/TestFrameworks/NUnit3Reporter.cs +++ b/src/ApprovalTests/Reporters/TestFrameworks/NUnit3Reporter.cs @@ -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) - { - } } \ No newline at end of file diff --git a/src/ApprovalTests/Reporters/TestFrameworks/NUnit4Reporter.cs b/src/ApprovalTests/Reporters/TestFrameworks/NUnit4Reporter.cs index f4d8cf48..b04092d3 100644 --- a/src/ApprovalTests/Reporters/TestFrameworks/NUnit4Reporter.cs +++ b/src/ApprovalTests/Reporters/TestFrameworks/NUnit4Reporter.cs @@ -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 isNUnit4 = new(IsisNUnit4); @@ -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) - { - } } \ No newline at end of file