File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
test/dotnet-watch.Tests/CommandLine Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -92,22 +92,15 @@ public async Task RunsWithIterationEnvVariable()
9292
9393 App . Start ( testAsset , [ ] ) ;
9494
95- await App . AssertStarted ( ) ;
95+ await App . WaitForOutputLineContaining ( MessageDescriptor . WaitingForFileChangeBeforeRestarting ) ;
9696
97- var source = Path . Combine ( testAsset . Path , "Program.cs" ) ;
98- var contents = File . ReadAllText ( source ) ;
99- const string messagePrefix = "DOTNET_WATCH_ITERATION = " ;
97+ App . AssertOutputContains ( "DOTNET_WATCH_ITERATION = 1" ) ;
98+ App . Process . ClearOutput ( ) ;
10099
101- var value = await App . AssertOutputLineStartsWith ( messagePrefix ) ;
102- Assert . Equal ( 1 , int . Parse ( value , CultureInfo . InvariantCulture ) ) ;
100+ UpdateSourceFile ( Path . Combine ( testAsset . Path , "Program.cs" ) ) ;
103101
104102 await App . WaitForOutputLineContaining ( MessageDescriptor . WaitingForFileChangeBeforeRestarting ) ;
105-
106- UpdateSourceFile ( source ) ;
107- await App . AssertStarted ( ) ;
108-
109- value = await App . AssertOutputLineStartsWith ( messagePrefix ) ;
110- Assert . Equal ( 2 , int . Parse ( value , CultureInfo . InvariantCulture ) ) ;
103+ App . AssertOutputContains ( "DOTNET_WATCH_ITERATION = 2" ) ;
111104 }
112105
113106 [ Fact ]
You can’t perform that action at this time.
0 commit comments