Skip to content

Commit ebe21e6

Browse files
committed
Annotate Settings Test
Also uncomment and explicitly mark SettingsControlTests instead of hiding them in a humungous comment block
1 parent 3a8cca1 commit ebe21e6

File tree

8 files changed

+487
-412
lines changed

8 files changed

+487
-412
lines changed

RubberduckTests/Grammar/VBAParserTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,6 +1670,7 @@ End Sub
16701670
AssertTree(parseResult.Item1, parseResult.Item2, "//argumentExpression", matches => matches.Count == 2);
16711671
}
16721672

1673+
[TestCategory("Parser")]
16731674
[TestMethod]
16741675
public void TestCaseIsEqExpressionWithLiteral()
16751676
{
@@ -1685,6 +1686,7 @@ End Sub
16851686
AssertTree(parseResult.Item1, parseResult.Item2, "//rangeClause", matches => matches.Count == 1);
16861687
}
16871688

1689+
[TestCategory("Parser")]
16881690
[TestMethod]
16891691
public void TestCaseIsEqExpressionWithEnum()
16901692
{

RubberduckTests/Settings/GeneralSettingsTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ private Configuration GetNondefaultConfig()
6262
return new Configuration(userSettings);
6363
}
6464

65+
[TestCategory("Settings")]
6566
[TestMethod]
6667
public void SaveConfigWorks()
6768
{
@@ -79,6 +80,7 @@ public void SaveConfigWorks()
7980
() => Assert.AreEqual(config.UserSettings.GeneralSettings.Delimiter, (char)viewModel.Delimiter));
8081
}
8182

83+
[TestCategory("Settings")]
8284
[TestMethod]
8385
public void SetDefaultsWorks()
8486
{
@@ -95,6 +97,7 @@ public void SetDefaultsWorks()
9597
() => Assert.AreEqual(defaultConfig.UserSettings.GeneralSettings.Delimiter, (char)viewModel.Delimiter));
9698
}
9799

100+
[TestCategory("Settings")]
98101
[TestMethod]
99102
public void LanguageIsSetInCtor()
100103
{
@@ -104,6 +107,7 @@ public void LanguageIsSetInCtor()
104107
Assert.AreEqual(defaultConfig.UserSettings.GeneralSettings.Language, viewModel.SelectedLanguage);
105108
}
106109

110+
[TestCategory("Settings")]
107111
[TestMethod]
108112
public void HotkeysAreSetInCtor()
109113
{
@@ -113,6 +117,7 @@ public void HotkeysAreSetInCtor()
113117
Assert.IsTrue(defaultConfig.UserSettings.HotkeySettings.Settings.SequenceEqual(viewModel.Hotkeys));
114118
}
115119

120+
[TestCategory("Settings")]
116121
[TestMethod]
117122
public void AutoSaveEnabledIsSetInCtor()
118123
{
@@ -122,6 +127,7 @@ public void AutoSaveEnabledIsSetInCtor()
122127
Assert.AreEqual(defaultConfig.UserSettings.GeneralSettings.AutoSaveEnabled, viewModel.AutoSaveEnabled);
123128
}
124129

130+
[TestCategory("Settings")]
125131
[TestMethod]
126132
public void AutoSavePeriodIsSetInCtor()
127133
{
@@ -131,6 +137,7 @@ public void AutoSavePeriodIsSetInCtor()
131137
Assert.AreEqual(defaultConfig.UserSettings.GeneralSettings.AutoSavePeriod, viewModel.AutoSavePeriod);
132138
}
133139

140+
[TestCategory("Settings")]
134141
[TestMethod]
135142
public void DelimiterIsSetInCtor()
136143
{

RubberduckTests/Settings/HotkeySettingsTests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace RubberduckTests.Settings
77
[TestClass]
88
public class HotkeySettingsTests
99
{
10+
[TestCategory("Settings")]
1011
[TestMethod]
1112
public void DefaultsSetInCtor()
1213
{
@@ -32,6 +33,7 @@ public void DefaultsSetInCtor()
3233
Assert.IsTrue(expected.SequenceEqual(actual));
3334
}
3435

36+
[TestCategory("Settings")]
3537
[TestMethod]
3638
public void InvalidSettingNameWontAdd()
3739
{
@@ -45,6 +47,7 @@ public void InvalidSettingNameWontAdd()
4547
Assert.IsTrue(expected.SequenceEqual(actual));
4648
}
4749

50+
[TestCategory("Settings")]
4851
[TestMethod]
4952
public void InvalidSettingKeyWontAdd()
5053
{
@@ -58,6 +61,7 @@ public void InvalidSettingKeyWontAdd()
5861
Assert.IsTrue(expected.SequenceEqual(actual));
5962
}
6063

64+
[TestCategory("Settings")]
6165
[TestMethod]
6266
public void DuplicateKeysAreDeactivated()
6367
{
@@ -73,6 +77,7 @@ public void DuplicateKeysAreDeactivated()
7377
Assert.IsFalse(duplicate1.IsEnabled == duplicate2.IsEnabled);
7478
}
7579

80+
[TestCategory("Settings")]
7681
[TestMethod]
7782
public void DuplicateNamesAreIgnored()
7883
{

RubberduckTests/Settings/IndenterSettingsTests.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ private Configuration GetNondefaultConfig()
102102
return new Configuration(userSettings);
103103
}
104104

105+
[TestCategory("Settings")]
105106
[TestMethod]
106107
public void SaveConfigWorks()
107108
{
@@ -130,6 +131,7 @@ public void SaveConfigWorks()
130131
() => Assert.AreEqual(config.UserSettings.IndenterSettings.IndentSpaces, viewModel.IndentSpaces));
131132
}
132133

134+
[TestCategory("Settings")]
133135
[TestMethod]
134136
public void SetDefaultsWorks()
135137
{
@@ -157,6 +159,7 @@ public void SetDefaultsWorks()
157159
() => Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.IndentSpaces, viewModel.IndentSpaces));
158160
}
159161

162+
[TestCategory("Settings")]
160163
[TestMethod]
161164
public void AlignCommentsWithCodeIsSetInCtor()
162165
{
@@ -166,6 +169,7 @@ public void AlignCommentsWithCodeIsSetInCtor()
166169
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.AlignCommentsWithCode, viewModel.AlignCommentsWithCode);
167170
}
168171

172+
[TestCategory("Settings")]
169173
[TestMethod]
170174
public void AlignContinuationsIsSetInCtor()
171175
{
@@ -175,6 +179,7 @@ public void AlignContinuationsIsSetInCtor()
175179
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.AlignContinuations, viewModel.AlignContinuations);
176180
}
177181

182+
[TestCategory("Settings")]
178183
[TestMethod]
179184
public void AlignDimColumnIsSetInCtor()
180185
{
@@ -184,6 +189,7 @@ public void AlignDimColumnIsSetInCtor()
184189
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.AlignDimColumn, viewModel.AlignDimColumn);
185190
}
186191

192+
[TestCategory("Settings")]
187193
[TestMethod]
188194
public void AlignDimsIsSetInCtor()
189195
{
@@ -193,6 +199,7 @@ public void AlignDimsIsSetInCtor()
193199
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.AlignDims, viewModel.AlignDims);
194200
}
195201

202+
[TestCategory("Settings")]
196203
[TestMethod]
197204
public void EndOfLineCommentColumnSpaceAlignmentIsSetInCtor()
198205
{
@@ -202,6 +209,7 @@ public void EndOfLineCommentColumnSpaceAlignmentIsSetInCtor()
202209
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.EndOfLineCommentColumnSpaceAlignment, viewModel.EndOfLineCommentColumnSpaceAlignment);
203210
}
204211

212+
[TestCategory("Settings")]
205213
[TestMethod]
206214
public void EndOfLineCommentStyleIsSetInCtor()
207215
{
@@ -211,6 +219,7 @@ public void EndOfLineCommentStyleIsSetInCtor()
211219
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.EndOfLineCommentStyle, viewModel.EndOfLineCommentStyle);
212220
}
213221

222+
[TestCategory("Settings")]
214223
[TestMethod]
215224
public void ForceCompilerDirectivesInColumn1IsSetInCtor()
216225
{
@@ -220,6 +229,7 @@ public void ForceCompilerDirectivesInColumn1IsSetInCtor()
220229
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.ForceCompilerDirectivesInColumn1, viewModel.ForceCompilerDirectivesInColumn1);
221230
}
222231

232+
[TestCategory("Settings")]
223233
[TestMethod]
224234
public void ForceDebugStatementsInColumn1IsSetInCtor()
225235
{
@@ -229,6 +239,7 @@ public void ForceDebugStatementsInColumn1IsSetInCtor()
229239
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.ForceDebugStatementsInColumn1, viewModel.ForceDebugStatementsInColumn1);
230240
}
231241

242+
[TestCategory("Settings")]
232243
[TestMethod]
233244
public void IgnoreOperatorsInContinuationsIsSetInCtor()
234245
{
@@ -238,6 +249,7 @@ public void IgnoreOperatorsInContinuationsIsSetInCtor()
238249
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.IgnoreOperatorsInContinuations, viewModel.IgnoreOperatorsInContinuations);
239250
}
240251

252+
[TestCategory("Settings")]
241253
[TestMethod]
242254
public void IndentCaseIsSetInCtor()
243255
{
@@ -247,6 +259,7 @@ public void IndentCaseIsSetInCtor()
247259
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.IndentCase, viewModel.IndentCase);
248260
}
249261

262+
[TestCategory("Settings")]
250263
[TestMethod]
251264
public void IndentEnumTypeAsProcedureIsSetInCtor()
252265
{
@@ -256,6 +269,7 @@ public void IndentEnumTypeAsProcedureIsSetInCtor()
256269
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.IndentEnumTypeAsProcedure, viewModel.IndentEnumTypeAsProcedure);
257270
}
258271

272+
[TestCategory("Settings")]
259273
[TestMethod]
260274
public void IndentCompilerDirectivesIsSetInCtor()
261275
{
@@ -265,6 +279,7 @@ public void IndentCompilerDirectivesIsSetInCtor()
265279
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.IndentCompilerDirectives, viewModel.IndentCompilerDirectives);
266280
}
267281

282+
[TestCategory("Settings")]
268283
[TestMethod]
269284
public void IndentEntireProcedureBodyIsSetInCtor()
270285
{
@@ -274,6 +289,7 @@ public void IndentEntireProcedureBodyIsSetInCtor()
274289
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.IndentEntireProcedureBody, viewModel.IndentEntireProcedureBody);
275290
}
276291

292+
[TestCategory("Settings")]
277293
[TestMethod]
278294
public void IndentFirstCommentBlockIsSetInCtor()
279295
{
@@ -283,6 +299,7 @@ public void IndentFirstCommentBlockIsSetInCtor()
283299
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.IndentFirstCommentBlock, viewModel.IndentFirstCommentBlock);
284300
}
285301

302+
[TestCategory("Settings")]
286303
[TestMethod]
287304
public void IndentFirstDeclarationBlockIsSetInCtor()
288305
{
@@ -292,6 +309,7 @@ public void IndentFirstDeclarationBlockIsSetInCtor()
292309
Assert.AreEqual(defaultConfig.UserSettings.IndenterSettings.IndentFirstDeclarationBlock, viewModel.IndentFirstDeclarationBlock);
293310
}
294311

312+
[TestCategory("Settings")]
295313
[TestMethod]
296314
public void IndentSpacesIsSetInCtor()
297315
{

RubberduckTests/Settings/InspectionSettingsTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ private Configuration GetNondefaultConfig()
4848
return new Configuration(userSettings);
4949
}
5050

51+
[TestCategory("Settings")]
5152
[TestMethod]
5253
public void SaveConfigWorks()
5354
{
@@ -61,6 +62,7 @@ public void SaveConfigWorks()
6162
viewModel.InspectionSettings.SourceCollection.OfType<CodeInspectionSetting>()));
6263
}
6364

65+
[TestCategory("Settings")]
6466
[TestMethod]
6567
public void SetDefaultsWorks()
6668
{
@@ -73,6 +75,7 @@ public void SetDefaultsWorks()
7375
viewModel.InspectionSettings.SourceCollection.OfType<CodeInspectionSetting>()));
7476
}
7577

78+
[TestCategory("Settings")]
7679
[TestMethod]
7780
public void InspectionsAreSetInCtor()
7881
{
@@ -83,6 +86,7 @@ public void InspectionsAreSetInCtor()
8386
viewModel.InspectionSettings.SourceCollection.OfType<CodeInspectionSetting>()));
8487
}
8588

89+
[TestCategory("Settings")]
8690
[TestMethod]
8791
public void InspectionSeveritiesAreUpdated()
8892
{

0 commit comments

Comments
 (0)