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()
239
239
DiagnosticVerifier . VerifyCSharpDiagnosticUsingAllAnalyzers ( source ) ;
240
240
}
241
241
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
-
267
242
[ TestMethod ]
268
243
[ Implemented ( Reason = "https://github.com/fluentassertions/fluentassertions.analyzers/issues/172" ) ]
269
244
public void AssertAreEqualDoesNotCompile ( )
Original file line number Diff line number Diff line change @@ -7,10 +7,8 @@ public abstract class CollectionAnalyzer : FluentAssertionsAnalyzer
7
7
{
8
8
protected override bool ShouldAnalyzeVariableType ( INamedTypeSymbol type , SemanticModel semanticModel )
9
9
{
10
- var iDictionaryType = semanticModel . GetGenericIDictionaryType ( ) ;
11
10
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 ) ;
14
12
}
15
13
}
16
14
}
You can’t perform that action at this time.
0 commit comments