Skip to content

Commit a3ae897

Browse files
committed
Fix tests.
1 parent 93a38a0 commit a3ae897

3 files changed

Lines changed: 17 additions & 13 deletions

File tree

PropertyChangedAnalyzers.Test/DocumentationTests.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ namespace PropertyChangedAnalyzers.Test
1717

1818
public static class DocumentationTests
1919
{
20-
private static readonly IReadOnlyList<DiagnosticAnalyzer> Analyzers = typeof(AnalyzerCategory)
21-
.Assembly
22-
.GetTypes()
23-
.Where(t => typeof(DiagnosticAnalyzer).IsAssignableFrom(t))
24-
.OrderBy(x => x.Name)
25-
.Select(t => (DiagnosticAnalyzer)Activator.CreateInstance(t))
26-
.ToArray();
20+
private static readonly IReadOnlyList<DiagnosticAnalyzer> Analyzers =
21+
typeof(AnalyzerCategory)
22+
.Assembly
23+
.GetTypes()
24+
.Where(t => typeof(DiagnosticAnalyzer).IsAssignableFrom(t) && !t.IsAbstract)
25+
.OrderBy(x => x.Name)
26+
.Select(t => (DiagnosticAnalyzer)Activator.CreateInstance(t))
27+
.ToArray();
2728

2829
private static readonly IReadOnlyList<DescriptorInfo> DescriptorInfos = Analyzers
2930
.SelectMany(DescriptorInfo.Create)

PropertyChangedAnalyzers.Test/HandlesRecursion.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010

1111
public static class HandlesRecursion
1212
{
13-
private static readonly IReadOnlyList<DiagnosticAnalyzer> AllAnalyzers = typeof(Descriptors)
13+
private static readonly IReadOnlyList<DiagnosticAnalyzer> AllAnalyzers =
14+
typeof(Descriptors)
1415
.Assembly
1516
.GetTypes()
16-
.Where(typeof(DiagnosticAnalyzer).IsAssignableFrom)
17+
.Where(t => typeof(DiagnosticAnalyzer).IsAssignableFrom(t) && !t.IsAbstract)
1718
.Select(t => (DiagnosticAnalyzer)Activator.CreateInstance(t))
1819
.ToArray();
1920

PropertyChangedAnalyzers.Test/ReproBox.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ public static class ReproBox
1515
{
1616
// ReSharper disable once UnusedMember.Local
1717
private static readonly IReadOnlyList<DiagnosticAnalyzer> AllAnalyzers =
18-
typeof(KnownSymbol).Assembly.GetTypes()
19-
.Where(typeof(DiagnosticAnalyzer).IsAssignableFrom)
20-
.Select(t => (DiagnosticAnalyzer)Activator.CreateInstance(t))
21-
.ToArray();
18+
typeof(KnownSymbol)
19+
.Assembly
20+
.GetTypes()
21+
.Where(t => typeof(DiagnosticAnalyzer).IsAssignableFrom(t) && !t.IsAbstract)
22+
.Select(t => (DiagnosticAnalyzer)Activator.CreateInstance(t))
23+
.ToArray();
2224

2325
private static readonly Solution Solution = CodeFactory.CreateSolution(
2426
new FileInfo("C:\\Git\\Gu.Reactive\\Gu.Reactive.sln"),

0 commit comments

Comments
 (0)