@@ -7,6 +7,7 @@ namespace StyleCop.Analyzers.Test.DocumentationRules
7
7
using System . Threading . Tasks ;
8
8
using Microsoft . CodeAnalysis . Testing ;
9
9
using StyleCop . Analyzers . DocumentationRules ;
10
+ using StyleCop . Analyzers . Test . Helpers ;
10
11
using StyleCop . Analyzers . Test . Verifiers ;
11
12
using Xunit ;
12
13
using static StyleCop . Analyzers . Test . Verifiers . CustomDiagnosticVerifier < StyleCop . Analyzers . DocumentationRules . SA1608ElementDocumentationMustNotHaveDefaultSummary > ;
@@ -17,9 +18,7 @@ namespace StyleCop.Analyzers.Test.DocumentationRules
17
18
public class SA1608UnitTests
18
19
{
19
20
[ Theory ]
20
- [ InlineData ( "class" ) ]
21
- [ InlineData ( "struct" ) ]
22
- [ InlineData ( "interface" ) ]
21
+ [ MemberData ( nameof ( CommonMemberData . BaseTypeDeclarationKeywords ) , MemberType = typeof ( CommonMemberData ) ) ]
23
22
public async Task TestTypeNoDocumentationAsync ( string typeName )
24
23
{
25
24
var testCode = @"
@@ -30,9 +29,7 @@ public async Task TestTypeNoDocumentationAsync(string typeName)
30
29
}
31
30
32
31
[ Theory ]
33
- [ InlineData ( "class" ) ]
34
- [ InlineData ( "struct" ) ]
35
- [ InlineData ( "interface" ) ]
32
+ [ MemberData ( nameof ( CommonMemberData . BaseTypeDeclarationKeywords ) , MemberType = typeof ( CommonMemberData ) ) ]
36
33
public async Task TestTypeWithSummaryDocumentationAsync ( string typeName )
37
34
{
38
35
var testCode = @"
@@ -46,9 +43,7 @@ public async Task TestTypeWithSummaryDocumentationAsync(string typeName)
46
43
}
47
44
48
45
[ Theory ]
49
- [ InlineData ( "class" ) ]
50
- [ InlineData ( "struct" ) ]
51
- [ InlineData ( "interface" ) ]
46
+ [ MemberData ( nameof ( CommonMemberData . BaseTypeDeclarationKeywords ) , MemberType = typeof ( CommonMemberData ) ) ]
52
47
public async Task TestTypeWithContentDocumentationAsync ( string typeName )
53
48
{
54
49
var testCode = @"
@@ -62,9 +57,7 @@ public async Task TestTypeWithContentDocumentationAsync(string typeName)
62
57
}
63
58
64
59
[ Theory ]
65
- [ InlineData ( "class" ) ]
66
- [ InlineData ( "struct" ) ]
67
- [ InlineData ( "interface" ) ]
60
+ [ MemberData ( nameof ( CommonMemberData . BaseTypeDeclarationKeywords ) , MemberType = typeof ( CommonMemberData ) ) ]
68
61
public async Task TestTypeWithInheritedDocumentationAsync ( string typeName )
69
62
{
70
63
var testCode = @"
@@ -76,9 +69,7 @@ public async Task TestTypeWithInheritedDocumentationAsync(string typeName)
76
69
}
77
70
78
71
[ Theory ]
79
- [ InlineData ( "class" ) ]
80
- [ InlineData ( "struct" ) ]
81
- [ InlineData ( "interface" ) ]
72
+ [ MemberData ( nameof ( CommonMemberData . BaseTypeDeclarationKeywords ) , MemberType = typeof ( CommonMemberData ) ) ]
82
73
public async Task TestTypeWithoutSummaryDocumentationAsync ( string typeName )
83
74
{
84
75
var testCode = @"
@@ -93,9 +84,7 @@ public async Task TestTypeWithoutSummaryDocumentationAsync(string typeName)
93
84
}
94
85
95
86
[ Theory ]
96
- [ InlineData ( "class" ) ]
97
- [ InlineData ( "struct" ) ]
98
- [ InlineData ( "interface" ) ]
87
+ [ MemberData ( nameof ( CommonMemberData . TypeDeclarationKeywords ) , MemberType = typeof ( CommonMemberData ) ) ]
99
88
public async Task TestTypeWithoutContentDocumentationAsync ( string typeName )
100
89
{
101
90
var testCode = @"
@@ -110,9 +99,7 @@ public async Task TestTypeWithoutContentDocumentationAsync(string typeName)
110
99
}
111
100
112
101
[ Theory ]
113
- [ InlineData ( "class" ) ]
114
- [ InlineData ( "struct" ) ]
115
- [ InlineData ( "interface" ) ]
102
+ [ MemberData ( nameof ( CommonMemberData . BaseTypeDeclarationKeywords ) , MemberType = typeof ( CommonMemberData ) ) ]
116
103
public async Task TestTypeWithDefaultDocumentationAsync ( string typeName )
117
104
{
118
105
var testCode = $@ "
0 commit comments