File tree 1 file changed +24
-0
lines changed
src/FluentAssertions.Analyzers.Tests/Tips
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -209,5 +209,29 @@ public static void Main()
209
209
210
210
DiagnosticVerifier . VerifyCSharpDiagnosticUsingAllAnalyzers ( source ) ;
211
211
}
212
+
213
+ [ TestMethod ]
214
+ [ Implemented ( Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/66" ) ]
215
+ public void CollectionShouldHaveElementAt_ShouldNotThrow ( )
216
+ {
217
+ const string source = @"
218
+ using System.Linq;
219
+ using FluentAssertions;
220
+ using FluentAssertions.Extensions;
221
+
222
+ namespace TestNamespace
223
+ {
224
+ public class Program
225
+ {
226
+ public static void Main()
227
+ {
228
+ var list = new[] { "" FOO "" };
229
+ list[0].Trim().Should().Be(""FOO"");
230
+ }
231
+ }
232
+ }" ;
233
+
234
+ DiagnosticVerifier . VerifyCSharpDiagnosticUsingAllAnalyzers ( source ) ;
235
+ }
212
236
}
213
237
}
You can’t perform that action at this time.
0 commit comments