File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,24 @@ public void Create_binding_to_OneStringOptionCommandAction_with_string_Symbol_gi
100100 binder . TypeBindings . GetUnboundSymbols ( ) . Should ( ) . BeEmpty ( ) ;
101101 }
102102
103+ [ TestMethod ]
104+ public void Create_binding_to_OneStringOptionCommandAction_with_string_Symbol_by_alias_given_Command_with_string_option ( )
105+ {
106+ var binder = CommandActionBinder < OneStringOptionCommandAction > . Create ( new ( "oneopt" )
107+ {
108+ new Option < string > ( "--very-fancy-option" , "--the-option" , "-o" )
109+ } , ( ) => new ( ) ) ;
110+ binder . Should ( ) . NotBeNull ( ) ;
111+ binder . TypeBindings . GetMappings ( ) . Should ( )
112+ . NotBeEmpty ( )
113+ . And . AllSatisfy ( mapping =>
114+ {
115+ mapping . Key . Name . Should ( ) . Be ( "--very-fancy-option" ) ;
116+ mapping . Value . Name . Should ( ) . Be ( "TheOption" ) ;
117+ } ) ;
118+ binder . TypeBindings . GetUnboundSymbols ( ) . Should ( ) . BeEmpty ( ) ;
119+ }
120+
103121 [ TestMethod ]
104122 public void Create_binding_to_OneStringOptionCommandAction_with_unbound_Symbol_given_Command_with_unaliased_string_option ( )
105123 {
You can’t perform that action at this time.
0 commit comments