Skip to content

Commit 7ed88f7

Browse files
committed
added test for exception in errorlist #10
1 parent 1944261 commit 7ed88f7

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/FluentAssertions.Analyzers.Tests/GenerateCode.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public static class GenerateCode
2323
.AppendLine(" public class TestComplexClass")
2424
.AppendLine(" {")
2525
.AppendLine(" public bool BooleanProperty { get; set; }")
26+
.AppendLine(" public string Message { get; set; }")
2627
.AppendLine(" }")
2728
.AppendLine(" class Program")
2829
.AppendLine(" {")
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Microsoft.VisualStudio.TestTools.UnitTesting;
2+
3+
namespace FluentAssertions.Analyzers.Tests.Tips
4+
{
5+
[TestClass]
6+
public class SanityTests
7+
{
8+
[TestMethod]
9+
[NotImplemented(Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/10")]
10+
public void AssertionCallMultipleMethodWithTheSameNameAndArguments()
11+
{
12+
const string assertion = "actual.Should().Contain(d => d.Message.Contains(\"a\")).And.Contain(d => d.Message.Contains(\"c\"));";
13+
var source = GenerateCode.EnumerableAssertion(assertion);
14+
15+
DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(source);
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)