@@ -141,6 +141,24 @@ public async Task Should_Perform_Speed_Test()
141141 await Verify ( result . Output ) ;
142142 }
143143
144+ [ Fact ]
145+ public async Task Should_Perform_Speed_Test_With_Fixed_Unit_Scale ( )
146+ {
147+ // Given
148+ var registrar = new TypeRegistrar ( ) ;
149+ registrar . Register ( typeof ( ISpeedTestService ) , typeof ( SpeedTestStub ) ) ;
150+ registrar . Register ( typeof ( IClock ) , typeof ( ClockStub ) ) ;
151+ registrar . Register ( typeof ( IWaiter ) , typeof ( NoDelayStub ) ) ;
152+ var app = GetCommandAppTester ( registrar ) ;
153+
154+ // When
155+ var result = await app . RunAsync ( "--unit-scale" , "Mega" ) ;
156+
157+ // Then
158+ Assert . Equal ( 0 , result . ExitCode ) ;
159+ await Verify ( result . Output ) ;
160+ }
161+
144162 [ Fact ]
145163 public async Task Should_Perform_Speed_Test_Continuously ( )
146164 {
@@ -203,6 +221,24 @@ public async Task Should_Perform_Speed_Test_Multiple_Times_With_Delay(int count,
203221 await Verify ( result . Output ) . UseParameters ( count , delay ) ;
204222 }
205223
224+ [ Fact ]
225+ public async Task Should_Perform_Speed_Test_Multiple_Times_With_Fixed_Scale ( )
226+ {
227+ // Given
228+ var registrar = new TypeRegistrar ( ) ;
229+ registrar . Register ( typeof ( ISpeedTestService ) , typeof ( VariableSpeedTester ) ) ;
230+ registrar . Register ( typeof ( IClock ) , typeof ( IncrementingClockStub ) ) ;
231+ registrar . Register ( typeof ( IWaiter ) , typeof ( NoDelayStub ) ) ;
232+ var app = GetCommandAppTester ( registrar ) ;
233+
234+ // When
235+ var result = await app . RunAsync ( "--count" , "3" , "--unit-scale" , "Mega" , "--verbosity" , "Minimal" ) ;
236+
237+ // Then
238+ Assert . Equal ( 0 , result . ExitCode ) ;
239+ await Verify ( result . Output ) ;
240+ }
241+
206242 [ InlineData ( "Minimal" ) ]
207243 [ InlineData ( "Normal" ) ]
208244 [ InlineData ( "Debug" ) ]
@@ -326,6 +362,24 @@ public async Task Should_Perform_Speed_Test_With_CSV_Multiple_Times_With_Delay(i
326362 await Verify ( result . Output ) . UseParameters ( count , delay ) ;
327363 }
328364
365+ [ Fact ]
366+ public async Task Should_Perform_Speed_Test_With_CSV_Multiple_Times_With_Fixed_Scale ( )
367+ {
368+ // Given
369+ var registrar = new TypeRegistrar ( ) ;
370+ registrar . Register ( typeof ( ISpeedTestService ) , typeof ( VariableSpeedTester ) ) ;
371+ registrar . Register ( typeof ( IClock ) , typeof ( IncrementingClockStub ) ) ;
372+ registrar . Register ( typeof ( IWaiter ) , typeof ( NoDelayStub ) ) ;
373+ var app = GetCommandAppTester ( registrar ) ;
374+
375+ // When
376+ var result = await app . RunAsync ( "--csv" , "--count" , "3" , "--unit-scale" , "Mega" , "--verbosity" , "Minimal" ) ;
377+
378+ // Then
379+ Assert . Equal ( 0 , result . ExitCode ) ;
380+ await Verify ( result . Output ) ;
381+ }
382+
329383 [ Fact ]
330384 public async Task Should_Perform_Speed_Test_With_CSV_No_Download ( )
331385 {
@@ -665,4 +719,5 @@ public async Task Should_Display_Version(string version)
665719 }
666720
667721 #endregion
722+
668723}
0 commit comments