@@ -18,29 +18,25 @@ namespace Microsoft.DotNet.CodeFormatting.Tests
1818 /// </summary>
1919 public sealed class CombinationTest : CodeFormattingTestBase , IDisposable
2020 {
21- private static FormattingEngineImplementation s_formattingEngine ;
22-
23- static CombinationTest ( )
24- {
25- s_formattingEngine = ( FormattingEngineImplementation ) FormattingEngine . Create ( ) ;
26- }
21+ private FormattingEngineImplementation _formattingEngine ;
2722
2823 public CombinationTest ( )
2924 {
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 ;
3430 }
3531
3632 public void Dispose ( )
3733 {
38- s_formattingEngine . AllowTables = false ;
34+ _formattingEngine . AllowTables = false ;
3935 }
4036
4137 protected override async Task < Document > RewriteDocumentAsync ( Document document )
4238 {
43- var solution = await s_formattingEngine . FormatCoreAsync (
39+ var solution = await _formattingEngine . FormatCoreAsync (
4440 document . Project . Solution ,
4541 new [ ] { document . Id } ,
4642 CancellationToken . None ) ;
@@ -147,7 +143,7 @@ internal void M()
147143#endif
148144}" ;
149145
150- s_formattingEngine . PreprocessorConfigurations = ImmutableArray . CreateRange ( new [ ] { new [ ] { "DOG" } } ) ;
146+ _formattingEngine . PreprocessorConfigurations = ImmutableArray . CreateRange ( new [ ] { new [ ] { "DOG" } } ) ;
151147 Verify ( text , expected , runFormatter : false ) ;
152148 }
153149
@@ -221,7 +217,7 @@ void M() {
221217#endif
222218}" ;
223219
224- s_formattingEngine . PreprocessorConfigurations = ImmutableArray . CreateRange ( new [ ] { new [ ] { "TEST" } } ) ;
220+ _formattingEngine . PreprocessorConfigurations = ImmutableArray . CreateRange ( new [ ] { new [ ] { "TEST" } } ) ;
225221 Verify ( text , expected , runFormatter : false ) ;
226222 }
227223
0 commit comments