Skip to content

Commit

Permalink
added test (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
Meir017 authored Jul 5, 2018
1 parent 9ca05f6 commit 00d7450
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/FluentAssertions.Analyzers.Tests/Tips/SanityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,29 @@ public static void Main()

DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(source);
}

[TestMethod]
[Implemented(Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/66")]
public void CollectionShouldHaveElementAt_ShouldNotThrow()
{
const string source = @"
using System.Linq;
using FluentAssertions;
using FluentAssertions.Extensions;
namespace TestNamespace
{
public class Program
{
public static void Main()
{
var list = new[] { "" FOO "" };
list[0].Trim().Should().Be(""FOO"");
}
}
}";

DiagnosticVerifier.VerifyCSharpDiagnosticUsingAllAnalyzers(source);
}
}
}

0 comments on commit 00d7450

Please sign in to comment.