@@ -919,12 +919,14 @@ public void Nunit4_AssertLessOrEqual_TestCodeFix(string oldAssertion, string new
919919
920920 [ DataTestMethod ]
921921 [ AssertionDiagnostic ( "Assert.AreEqual(expected, actual, delta{0});" ) ]
922+ [ AssertionDiagnostic ( "Assert.AreEqual(actual, 4.2d, delta{0});" ) ]
922923 [ Implemented ]
923924 public void Nunit3_AssertEqualDouble_TestAnalyzer ( string assertion )
924925 => Nunit3VerifyDiagnostic ( "double expected, double actual, double delta" , assertion ) ;
925926
926927 [ DataTestMethod ]
927928 [ AssertionDiagnostic ( "ClassicAssert.AreEqual(expected, actual, delta{0});" ) ]
929+ [ AssertionDiagnostic ( "ClassicAssert.AreEqual(actual, 4.2d, delta{0});" ) ]
928930 [ Implemented ]
929931 public void Nunit4_AssertEqualDouble_TestAnalyzer ( string assertion )
930932 => Nunit4VerifyDiagnostic ( "double expected, double actual, double delta" , assertion ) ;
@@ -933,6 +935,9 @@ public void Nunit4_AssertEqualDouble_TestAnalyzer(string assertion)
933935 [ AssertionCodeFix (
934936 oldAssertion : "Assert.AreEqual(expected, actual, delta{0});" ,
935937 newAssertion : "actual.Should().BeApproximately(expected, delta{0});" ) ]
938+ [ AssertionCodeFix (
939+ oldAssertion : "Assert.AreEqual(actual, 4.2d, delta{0});" ,
940+ newAssertion : "actual.Should().BeApproximately(4.2d, delta{0});" ) ]
936941 [ Implemented ]
937942 public void Nunit3_AssertEqualDouble_TestCodeFix ( string oldAssertion , string newAssertion )
938943 => Nunit3VerifyFix ( "double expected, double actual, double delta" , oldAssertion , newAssertion ) ;
@@ -941,18 +946,23 @@ public void Nunit3_AssertEqualDouble_TestCodeFix(string oldAssertion, string new
941946 [ AssertionCodeFix (
942947 oldAssertion : "ClassicAssert.AreEqual(expected, actual, delta{0});" ,
943948 newAssertion : "actual.Should().BeApproximately(expected, delta{0});" ) ]
949+ [ AssertionCodeFix (
950+ oldAssertion : "ClassicAssert.AreEqual(actual, 4.2d, delta{0});" ,
951+ newAssertion : "actual.Should().BeApproximately(4.2d, delta{0});" ) ]
944952 [ Implemented ]
945953 public void Nunit4_AssertEqualDouble_TestCodeFix ( string oldAssertion , string newAssertion )
946954 => Nunit4VerifyFix ( "double expected, double actual, double delta" , oldAssertion , newAssertion ) ;
947955
948956 [ DataTestMethod ]
949957 [ AssertionDiagnostic ( "Assert.AreEqual(expected, actual{0});" ) ]
958+ [ AssertionDiagnostic ( "Assert.AreEqual(actual, \" foo\" {0});" ) ]
950959 [ Implemented ]
951960 public void Nunit3_AssertEqualObject_TestAnalyzer ( string assertion )
952961 => Nunit3VerifyDiagnostic ( "object expected, object actual" , assertion ) ;
953962
954963 [ DataTestMethod ]
955964 [ AssertionDiagnostic ( "ClassicAssert.AreEqual(expected, actual{0});" ) ]
965+ [ AssertionDiagnostic ( "ClassicAssert.AreEqual(actual, \" foo\" {0});" ) ]
956966 [ Implemented ]
957967 public void Nunit4_AssertEqualObject_TestAnalyzer ( string assertion )
958968 => Nunit4VerifyDiagnostic ( "object expected, object actual" , assertion ) ;
@@ -961,6 +971,9 @@ public void Nunit4_AssertEqualObject_TestAnalyzer(string assertion)
961971 [ AssertionCodeFix (
962972 oldAssertion : "Assert.AreEqual(expected, actual{0});" ,
963973 newAssertion : "actual.Should().Be(expected{0});" ) ]
974+ [ AssertionCodeFix (
975+ oldAssertion : "Assert.AreEqual(actual, \" foo\" {0});" ,
976+ newAssertion : "actual.Should().Be(\" foo\" {0});" ) ]
964977 [ Implemented ]
965978 public void Nunit3_AssertEqualObject_TestCodeFix ( string oldAssertion , string newAssertion )
966979 => Nunit3VerifyFix ( "object expected, object actual" , oldAssertion , newAssertion ) ;
@@ -969,18 +982,23 @@ public void Nunit3_AssertEqualObject_TestCodeFix(string oldAssertion, string new
969982 [ AssertionCodeFix (
970983 oldAssertion : "ClassicAssert.AreEqual(expected, actual{0});" ,
971984 newAssertion : "actual.Should().Be(expected{0});" ) ]
985+ [ AssertionCodeFix (
986+ oldAssertion : "ClassicAssert.AreEqual(actual, \" foo\" {0});" ,
987+ newAssertion : "actual.Should().Be(\" foo\" {0});" ) ]
972988 [ Implemented ]
973989 public void Nunit4_AssertEqualObject_TestCodeFix ( string oldAssertion , string newAssertion )
974990 => Nunit4VerifyFix ( "object expected, object actual" , oldAssertion , newAssertion ) ;
975991
976992 [ DataTestMethod ]
977993 [ AssertionDiagnostic ( "Assert.AreNotEqual(expected, actual{0});" ) ]
994+ [ AssertionDiagnostic ( "Assert.AreNotEqual(actual, \" foo\" {0});" ) ]
978995 [ Implemented ]
979996 public void Nunit3_AssertNotEqualObject_TestAnalyzer ( string assertion )
980997 => Nunit3VerifyDiagnostic ( "object expected, object actual" , assertion ) ;
981998
982999 [ DataTestMethod ]
9831000 [ AssertionDiagnostic ( "ClassicAssert.AreNotEqual(expected, actual{0});" ) ]
1001+ [ AssertionDiagnostic ( "ClassicAssert.AreNotEqual(actual, \" foo\" {0});" ) ]
9841002 [ Implemented ]
9851003 public void Nunit4_AssertNotEqualObject_TestAnalyzer ( string assertion )
9861004 => Nunit4VerifyDiagnostic ( "object expected, object actual" , assertion ) ;
@@ -989,6 +1007,9 @@ public void Nunit4_AssertNotEqualObject_TestAnalyzer(string assertion)
9891007 [ AssertionCodeFix (
9901008 oldAssertion : "Assert.AreNotEqual(expected, actual{0});" ,
9911009 newAssertion : "actual.Should().NotBe(expected{0});" ) ]
1010+ [ AssertionCodeFix (
1011+ oldAssertion : "Assert.AreNotEqual(actual, \" foo\" {0});" ,
1012+ newAssertion : "actual.Should().NotBe(\" foo\" {0});" ) ]
9921013 [ Implemented ]
9931014 public void Nunit3_AssertNotEqualObject_TestCodeFix ( string oldAssertion , string newAssertion )
9941015 => Nunit3VerifyFix ( "object expected, object actual" , oldAssertion , newAssertion ) ;
@@ -997,6 +1018,9 @@ public void Nunit3_AssertNotEqualObject_TestCodeFix(string oldAssertion, string
9971018 [ AssertionCodeFix (
9981019 oldAssertion : "ClassicAssert.AreNotEqual(expected, actual{0});" ,
9991020 newAssertion : "actual.Should().NotBe(expected{0});" ) ]
1021+ [ AssertionCodeFix (
1022+ oldAssertion : "ClassicAssert.AreNotEqual(actual, \" foo\" {0});" ,
1023+ newAssertion : "actual.Should().NotBe(\" foo\" {0});" ) ]
10001024 [ Implemented ]
10011025 public void Nunit4_AssertNotEqualObject_TestCodeFix ( string oldAssertion , string newAssertion )
10021026 => Nunit4VerifyFix ( "object expected, object actual" , oldAssertion , newAssertion ) ;
0 commit comments