Skip to content

Commit

Permalink
add test cases (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
Meir017 committed Sep 11, 2023
1 parent 3c6579f commit 88746ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/FluentAssertions.Analyzers.Tests/Tips/MsTestTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections;
Expand Down Expand Up @@ -266,6 +266,7 @@ public void AssertIsNotNull_TestCodeFix(string oldAssertion, string newAssertion
[AssertionDataTestMethod]
[AssertionDiagnostic("Assert.IsInstanceOfType(actual, type{0});")]
[AssertionDiagnostic("Assert.IsInstanceOfType(actual, typeof(string){0});")]
[AssertionDiagnostic("Assert.IsInstanceOfType<string>(actual{0});")]
[Implemented]
public void AssertIsInstanceOfType_TestAnalyzer(string assertion) => VerifyCSharpDiagnostic<AssertIsInstanceOfTypeAnalyzer>("object actual, Type type", assertion);

Expand All @@ -276,6 +277,9 @@ public void AssertIsNotNull_TestCodeFix(string oldAssertion, string newAssertion
[AssertionCodeFix(
oldAssertion: "Assert.IsInstanceOfType(actual, typeof(string){0});",
newAssertion: "actual.Should().BeOfType<string>({0});")]
[AssertionCodeFix(
oldAssertion: "Assert.IsInstanceOfType<string>(actual{0});",
newAssertion: "actual.Should().BeOfType<string>({0});")]
[Implemented]
public void AssertIsInstanceOfType_TestCodeFix(string oldAssertion, string newAssertion)
=> VerifyCSharpFix<AssertIsInstanceOfTypeCodeFix, AssertIsInstanceOfTypeAnalyzer>("object actual, Type type", oldAssertion, newAssertion);
Expand Down

0 comments on commit 88746ae

Please sign in to comment.