Skip to content

Commit aca496f

Browse files
committed
added sanity test cases for #13
1 parent 7ed88f7 commit aca496f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,25 @@ public void AssertionCallMultipleMethodWithTheSameNameAndArguments()
1414

1515
DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(source);
1616
}
17+
18+
[TestMethod]
19+
[NotImplemented(Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/13")]
20+
public void PropertyOfIndexerShouldBe_ShouldNotThrowException()
21+
{
22+
const string assertion = "actual[0].Message.Should().Be(\"test\");";
23+
var source = GenerateCode.EnumerableAssertion(assertion);
24+
25+
DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(source);
26+
}
27+
28+
[TestMethod]
29+
[NotImplemented(Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/13")]
30+
public void PropertyOfElementAtShouldBe_ShouldNotTriggerDiagnostic()
31+
{
32+
const string assertion = "actual.ElementAt(0).Message.Should().Be(\"test\");";
33+
var source = GenerateCode.EnumerableAssertion(assertion);
34+
35+
DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(source);
36+
}
1737
}
1838
}

0 commit comments

Comments
 (0)