@@ -34,61 +34,61 @@ public void Value_is_always_activated()
3434 public void ValueSubsystem_returns_values_that_are_entered ( )
3535 {
3636 var consoleHack = new ConsoleHack ( ) . RedirectToBuffer ( true ) ;
37- CliOption < int > option1 = new CliOption < int > ( "--intValue" ) ;
37+ CliOption < int > option = new CliOption < int > ( "--intValue" ) ;
3838 CliRootCommand rootCommand = [
3939 new CliCommand ( "x" )
4040 {
41- option1
41+ option
4242 } ] ;
4343 var configuration = new CliConfiguration ( rootCommand ) ;
4444 var pipeline = Pipeline . CreateEmpty ( ) ;
4545 pipeline . Value = new ValueSubsystem ( ) ;
46- const int expected1 = 42 ;
47- var input = $ "x --intValue { expected1 } ";
46+ const int expected = 42 ;
47+ var input = $ "x --intValue { expected } ";
4848
4949 var parseResult = pipeline . Parse ( configuration , input ) ; // assigned for debugging
5050 pipeline . Execute ( configuration , input , consoleHack ) ;
5151
52- pipeline . Value . GetValue < int > ( option1 ) . Should ( ) . Be ( expected1 ) ;
52+ pipeline . Value . GetValue < int > ( option ) . Should ( ) . Be ( expected ) ;
5353 }
5454
5555 [ Fact ]
5656 public void ValueSubsystem_returns_default_value_when_no_value_is_entered ( )
5757 {
5858 var consoleHack = new ConsoleHack ( ) . RedirectToBuffer ( true ) ;
59- CliOption < int > option1 = new CliOption < int > ( "--intValue" ) ;
60- CliRootCommand rootCommand = [ option1 ] ;
59+ CliOption < int > option = new CliOption < int > ( "--intValue" ) ;
60+ CliRootCommand rootCommand = [ option ] ;
6161 var configuration = new CliConfiguration ( rootCommand ) ;
6262 var pipeline = Pipeline . CreateEmpty ( ) ;
6363 pipeline . Value = new ValueSubsystem ( ) ;
64- pipeline . Value . DefaultValue . Set ( option1 , 43 ) ;
65- const int expected1 = 43 ;
64+ pipeline . Value . DefaultValue . Set ( option , 43 ) ;
65+ const int expected = 43 ;
6666 var input = $ "" ;
6767
6868 var parseResult = pipeline . Parse ( configuration , input ) ; // assigned for debugging
6969 pipeline . Execute ( configuration , input , consoleHack ) ;
7070
71- pipeline . Value . GetValue < int > ( option1 ) . Should ( ) . Be ( expected1 ) ;
71+ pipeline . Value . GetValue < int > ( option ) . Should ( ) . Be ( expected ) ;
7272 }
7373
7474
7575 [ Fact ]
7676 public void ValueSubsystem_returns_calculated_default_value_when_no_value_is_entered ( )
7777 {
7878 var consoleHack = new ConsoleHack ( ) . RedirectToBuffer ( true ) ;
79- CliOption < int > option1 = new CliOption < int > ( "--intValue" ) ;
80- CliRootCommand rootCommand = [ option1 ] ;
79+ CliOption < int > option = new CliOption < int > ( "--intValue" ) ;
80+ CliRootCommand rootCommand = [ option ] ;
8181 var configuration = new CliConfiguration ( rootCommand ) ;
8282 var pipeline = Pipeline . CreateEmpty ( ) ;
8383 pipeline . Value = new ValueSubsystem ( ) ;
8484 var x = 42 ;
85- pipeline . Value . DefaultValueCalculation . Set ( option1 , ( ) => x + 2 ) ;
86- const int expected1 = 44 ;
85+ pipeline . Value . DefaultValueCalculation . Set ( option , ( ) => x + 2 ) ;
86+ const int expected = 44 ;
8787 var input = $ "" ;
8888
8989 var parseResult = pipeline . Parse ( configuration , input ) ; // assigned for debugging
9090 pipeline . Execute ( configuration , input , consoleHack ) ;
9191
92- pipeline . Value . GetValue < int > ( option1 ) . Should ( ) . Be ( expected1 ) ;
92+ pipeline . Value . GetValue < int > ( option ) . Should ( ) . Be ( expected ) ;
9393 }
9494}
0 commit comments