File tree Expand file tree Collapse file tree 2 files changed +1
-28
lines changed
FluentAssertions.Analyzers.Tests/Tips
FluentAssertions.Analyzers/Tips/Collections Expand file tree Collapse file tree 2 files changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -239,31 +239,6 @@ public static void Main()
239239 DiagnosticVerifier . VerifyCSharpDiagnosticUsingAllAnalyzers ( source ) ;
240240 }
241241
242- [ TestMethod ]
243- [ Implemented ( Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/77" ) ]
244- public void DictionaryShouldHaveCount1_ShouldNotReport ( )
245- {
246- const string source = @"
247- using System.Linq;
248- using System.Collections.Generic;
249- using FluentAssertions;
250- using FluentAssertions.Extensions;
251-
252- namespace TestNamespace
253- {
254- public class Program
255- {
256- public static void Main()
257- {
258- var dict = new Dictionary<string, object>();
259- dict.Should().HaveCount(1);
260- }
261- }
262- }" ;
263-
264- DiagnosticVerifier . VerifyCSharpDiagnosticUsingAllAnalyzers ( source ) ;
265- }
266-
267242 [ TestMethod ]
268243 [ Implemented ( Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/172" ) ]
269244 public void AssertAreEqualDoesNotCompile ( )
Original file line number Diff line number Diff line change @@ -7,10 +7,8 @@ public abstract class CollectionAnalyzer : FluentAssertionsAnalyzer
77 {
88 protected override bool ShouldAnalyzeVariableType ( INamedTypeSymbol type , SemanticModel semanticModel )
99 {
10- var iDictionaryType = semanticModel . GetGenericIDictionaryType ( ) ;
1110 return type . SpecialType != SpecialType . System_String
12- && type . IsTypeOrConstructedFromTypeOrImplementsType ( SpecialType . System_Collections_Generic_IEnumerable_T )
13- && ! type . IsTypeOrConstructedFromTypeOrImplementsType ( iDictionaryType ) ;
11+ && type . IsTypeOrConstructedFromTypeOrImplementsType ( SpecialType . System_Collections_Generic_IEnumerable_T ) ;
1412 }
1513 }
1614}
You can’t perform that action at this time.
0 commit comments