Skip to content

Commit 88746ae

Browse files
authored
add test cases (#220)
1 parent 3c6579f commit 88746ae

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/FluentAssertions.Analyzers.Tests/Tips/MsTestTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Microsoft.CodeAnalysis;
1+
using Microsoft.CodeAnalysis;
22
using Microsoft.VisualStudio.TestTools.UnitTesting;
33
using System;
44
using System.Collections;
@@ -266,6 +266,7 @@ public void AssertIsNotNull_TestCodeFix(string oldAssertion, string newAssertion
266266
[AssertionDataTestMethod]
267267
[AssertionDiagnostic("Assert.IsInstanceOfType(actual, type{0});")]
268268
[AssertionDiagnostic("Assert.IsInstanceOfType(actual, typeof(string){0});")]
269+
[AssertionDiagnostic("Assert.IsInstanceOfType<string>(actual{0});")]
269270
[Implemented]
270271
public void AssertIsInstanceOfType_TestAnalyzer(string assertion) => VerifyCSharpDiagnostic<AssertIsInstanceOfTypeAnalyzer>("object actual, Type type", assertion);
271272

@@ -276,6 +277,9 @@ public void AssertIsNotNull_TestCodeFix(string oldAssertion, string newAssertion
276277
[AssertionCodeFix(
277278
oldAssertion: "Assert.IsInstanceOfType(actual, typeof(string){0});",
278279
newAssertion: "actual.Should().BeOfType<string>({0});")]
280+
[AssertionCodeFix(
281+
oldAssertion: "Assert.IsInstanceOfType<string>(actual{0});",
282+
newAssertion: "actual.Should().BeOfType<string>({0});")]
279283
[Implemented]
280284
public void AssertIsInstanceOfType_TestCodeFix(string oldAssertion, string newAssertion)
281285
=> VerifyCSharpFix<AssertIsInstanceOfTypeCodeFix, AssertIsInstanceOfTypeAnalyzer>("object actual, Type type", oldAssertion, newAssertion);

0 commit comments

Comments
 (0)