@@ -18,29 +18,25 @@ namespace Microsoft.DotNet.CodeFormatting.Tests
18
18
/// </summary>
19
19
public sealed class CombinationTest : CodeFormattingTestBase , IDisposable
20
20
{
21
- private static FormattingEngineImplementation s_formattingEngine ;
22
-
23
- static CombinationTest ( )
24
- {
25
- s_formattingEngine = ( FormattingEngineImplementation ) FormattingEngine . Create ( ) ;
26
- }
21
+ private FormattingEngineImplementation _formattingEngine ;
27
22
28
23
public CombinationTest ( )
29
24
{
30
- s_formattingEngine . CopyrightHeader = ImmutableArray . Create ( "// header" ) ;
31
- s_formattingEngine . AllowTables = true ;
32
- s_formattingEngine . FormatLogger = new EmptyFormatLogger ( ) ;
33
- s_formattingEngine . PreprocessorConfigurations = ImmutableArray < string [ ] > . Empty ;
25
+ _formattingEngine = ( FormattingEngineImplementation ) FormattingEngine . Create ( ) ;
26
+ _formattingEngine . CopyrightHeader = ImmutableArray . Create ( "// header" ) ;
27
+ _formattingEngine . AllowTables = true ;
28
+ _formattingEngine . FormatLogger = new EmptyFormatLogger ( ) ;
29
+ _formattingEngine . PreprocessorConfigurations = ImmutableArray < string [ ] > . Empty ;
34
30
}
35
31
36
32
public void Dispose ( )
37
33
{
38
- s_formattingEngine . AllowTables = false ;
34
+ _formattingEngine . AllowTables = false ;
39
35
}
40
36
41
37
protected override async Task < Document > RewriteDocumentAsync ( Document document )
42
38
{
43
- var solution = await s_formattingEngine . FormatCoreAsync (
39
+ var solution = await _formattingEngine . FormatCoreAsync (
44
40
document . Project . Solution ,
45
41
new [ ] { document . Id } ,
46
42
CancellationToken . None ) ;
@@ -147,7 +143,7 @@ internal void M()
147
143
#endif
148
144
}" ;
149
145
150
- s_formattingEngine . PreprocessorConfigurations = ImmutableArray . CreateRange ( new [ ] { new [ ] { "DOG" } } ) ;
146
+ _formattingEngine . PreprocessorConfigurations = ImmutableArray . CreateRange ( new [ ] { new [ ] { "DOG" } } ) ;
151
147
Verify ( text , expected , runFormatter : false ) ;
152
148
}
153
149
@@ -221,7 +217,7 @@ void M() {
221
217
#endif
222
218
}" ;
223
219
224
- s_formattingEngine . PreprocessorConfigurations = ImmutableArray . CreateRange ( new [ ] { new [ ] { "TEST" } } ) ;
220
+ _formattingEngine . PreprocessorConfigurations = ImmutableArray . CreateRange ( new [ ] { new [ ] { "TEST" } } ) ;
225
221
Verify ( text , expected , runFormatter : false ) ;
226
222
}
227
223
0 commit comments