@@ -15,41 +15,41 @@ public class TestFixtureShouldBeAbstractCodeFixTests
15
15
private static readonly ExpectedDiagnostic expectedDiagnostic =
16
16
ExpectedDiagnostic . Create ( AnalyzerIdentifiers . BaseTestFixtureIsNotAbstract ) ;
17
17
18
- private static readonly IEnumerable < string > testMethodRelatedAttributes =
18
+ private static readonly IEnumerable < string [ ] > testMethodRelatedAttributes =
19
19
[
20
- " OneTimeSetUp",
21
- " OneTimeTearDown",
22
- " SetUp",
23
- " TearDown",
24
- " Test",
20
+ [ "" , " OneTimeSetUp"] ,
21
+ [ "internal " , " OneTimeTearDown"] ,
22
+ [ "public " , " SetUp"] ,
23
+ [ "partial " , " TearDown"] ,
24
+ [ "internal partial " , " Test"] ,
25
25
] ;
26
26
27
27
[ TestCaseSource ( nameof ( testMethodRelatedAttributes ) ) ]
28
- public void FixWhenBaseFixtureIsNotAbstract ( string attribute )
28
+ public void FixWhenBaseFixtureIsNotAbstract ( string modifiers , string attribute )
29
29
{
30
30
var testCode = TestUtility . WrapClassInNamespaceAndAddUsing ( $@ "
31
31
// Base Fixture
32
- public class ↓BaseFixture
32
+ { modifiers } class ↓BaseFixture
33
33
{{
34
34
[{ attribute } ]
35
35
public void BaseFixtureMethod() {{ }}
36
36
}}
37
37
38
- public class DerivedFixture : BaseFixture
38
+ { modifiers } class DerivedFixture : BaseFixture
39
39
{{
40
40
[Test]
41
41
public void DerivedFixtureMethod() {{ }}
42
42
}}" ) ;
43
43
44
44
var fixedCode = TestUtility . WrapClassInNamespaceAndAddUsing ( $@ "
45
45
// Base Fixture
46
- public abstract class BaseFixture
46
+ { modifiers } abstract class BaseFixture
47
47
{{
48
48
[{ attribute } ]
49
49
public void BaseFixtureMethod() {{ }}
50
50
}}
51
51
52
- public class DerivedFixture : BaseFixture
52
+ { modifiers } class DerivedFixture : BaseFixture
53
53
{{
54
54
[Test]
55
55
public void DerivedFixtureMethod() {{ }}
0 commit comments