@@ -130,22 +130,28 @@ private class ShortNameType
130130 [ Fact ]
131131 public void ItInfersClusterOptionsCannotBeUsed ( )
132132 {
133- var app1 = new CommandLineApplication ( ) ;
134- app1 . Option ( "-au|--auth" , "Verbose output" , CommandOptionType . NoValue ) ;
135- app1 . Parse ( ) ;
136- Assert . False ( app1 . ClusterOptions ) ;
137-
138- var app2 = new CommandLineApplication ( ) ;
139- app2 . Command ( "sub" , c => c . Option ( "-au|--auth" , "Verbose output" , CommandOptionType . NoValue ) ) ;
140- Assert . False ( app2 . ClusterOptionsWasSetExplicitly ) ;
141- app2 . Parse ( ) ;
142- Assert . False ( app2 . ClusterOptions ) ;
143-
144- var app3 = new CommandLineApplication < ShortNameType > ( ) ;
145- app3 . Conventions . UseDefaultConventions ( ) ;
146- Assert . False ( app3 . ClusterOptionsWasSetExplicitly ) ;
147- app3 . Parse ( ) ;
148- Assert . False ( app3 . ClusterOptions ) ;
133+ {
134+ var app = new CommandLineApplication ( ) ;
135+ app . Option ( "-au|--auth" , "Verbose output" , CommandOptionType . NoValue ) ;
136+ app . Parse ( ) ;
137+ Assert . False ( app . ClusterOptions ) ;
138+ }
139+
140+ {
141+ var app = new CommandLineApplication ( ) ;
142+ app . Command ( "sub" , c => c . Option ( "-au|--auth" , "Verbose output" , CommandOptionType . NoValue ) ) ;
143+ Assert . False ( app . ClusterOptionsWasSetExplicitly ) ;
144+ app . Parse ( ) ;
145+ Assert . False ( app . ClusterOptions ) ;
146+ }
147+
148+ {
149+ var app = new CommandLineApplication < ShortNameType > ( ) ;
150+ app . Conventions . UseDefaultConventions ( ) ;
151+ Assert . False ( app . ClusterOptionsWasSetExplicitly ) ;
152+ app . Parse ( ) ;
153+ Assert . False ( app . ClusterOptions ) ;
154+ }
149155 }
150156
151157 [ Fact ]
0 commit comments