Skip to content

Commit

Permalink
tests: add mtest tests for generic Assert.IsNotInstanceOfType
Browse files Browse the repository at this point in the history
  • Loading branch information
Meir017 committed May 20, 2024
1 parent db3aeac commit bbd8b36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/FluentAssertions.Analyzers.Tests/Tips/MsTestTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ public void AssertIsInstanceOfType_TestCodeFix(string oldAssertion, string newAs
[DataTestMethod]
[AssertionDiagnostic("Assert.IsNotInstanceOfType(actual, type{0});")]
[AssertionDiagnostic("Assert.IsNotInstanceOfType(actual, typeof(string){0});")]
[AssertionDiagnostic("Assert.IsNotInstanceOfType<string>(actual{0});")]
[Implemented]
public void AssertIsNotInstanceOfType_TestAnalyzer(string assertion) => VerifyCSharpDiagnostic("object actual, Type type", assertion);

Expand All @@ -286,6 +287,9 @@ public void AssertIsInstanceOfType_TestCodeFix(string oldAssertion, string newAs
[AssertionCodeFix(
oldAssertion: "Assert.IsNotInstanceOfType(actual, typeof(string){0});",
newAssertion: "actual.Should().NotBeOfType<string>({0});")]
[AssertionCodeFix(
oldAssertion: "Assert.IsNotInstanceOfType<string>(actual{0});",
newAssertion: "actual.Should().NotBeOfType<string>({0});")]
[Implemented]
public void AssertIsNotInstanceOfType_TestCodeFix(string oldAssertion, string newAssertion)
=> VerifyCSharpFix("object actual, Type type", oldAssertion, newAssertion);
Expand Down

0 comments on commit bbd8b36

Please sign in to comment.