@@ -19,7 +19,17 @@ public class SA1217UnitTests
1919{
2020 ""settings"": {
2121 ""orderingRules"": {
22- ""systemUsingDirectivesFirst"": ""true""
22+ ""systemUsingDirectivesFirst"": true
23+ }
24+ }
25+ }
26+ " ;
27+
28+ private const string TestSettingsNoSystemDirectivesFirst = @"
29+ {
30+ ""settings"": {
31+ ""orderingRules"": {
32+ ""systemUsingDirectivesFirst"": false
2333 }
2434 }
2535}
@@ -203,8 +213,8 @@ public async Task TestInvalidUsingDirectivesWithGlobalPrefixAsync()
203213 public async Task TestPreprocessorDirectivesAsync ( )
204214 {
205215 var testCode = @"
206- using System;
207216using Microsoft.Win32;
217+ using System;
208218using MyList = System.Collections.Generic.List<int>;
209219using static System.Tuple;
210220
@@ -217,8 +227,8 @@ public async Task TestPreprocessorDirectivesAsync()
217227#endif" ;
218228
219229 var fixedTestCode = @"
220- using System;
221230using Microsoft.Win32;
231+ using System;
222232using static System.Tuple;
223233using MyList = System.Collections.Generic.List<int>;
224234
@@ -295,7 +305,7 @@ private Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] expec
295305 var test = new StyleCopCodeFixVerifier < SA1217UsingStaticDirectivesMustBeOrderedAlphabetically , UsingCodeFixProvider > . CSharpTest
296306 {
297307 TestCode = source ,
298- Settings = this . useSystemUsingDirectivesFirst ? TestSettings : null ,
308+ Settings = this . useSystemUsingDirectivesFirst ? TestSettings : TestSettingsNoSystemDirectivesFirst ,
299309 } ;
300310
301311 test . ExpectedDiagnostics . AddRange ( expected ) ;
@@ -308,7 +318,7 @@ private Task VerifyCSharpFixAsync(string source, DiagnosticResult[] expected, st
308318 {
309319 TestCode = source ,
310320 FixedCode = fixedSource ,
311- Settings = this . useSystemUsingDirectivesFirst ? TestSettings : null ,
321+ Settings = this . useSystemUsingDirectivesFirst ? TestSettings : TestSettingsNoSystemDirectivesFirst ,
312322 } ;
313323
314324 test . ExpectedDiagnostics . AddRange ( expected ) ;
0 commit comments