@@ -63,15 +63,15 @@ public void testInvalidArgumentFormat() {
6363 @ Test
6464 public void testSimpleBooleanPresent () throws Exception {
6565 Args args = new Args ("x" , new String []{"-x" });
66- assertEquals (true , args .getBoolean ('x' ));
66+ assertEquals (true , args .getValue ('x' ));
6767 assertEquals (1 , args .nextArgument ());
6868 }
6969
7070 @ Test
7171 public void testSimpleStringPresent () throws Exception {
7272 Args args = new Args ("x*" , new String []{"-x" , "param" });
7373 assertTrue (args .has ('x' ));
74- assertEquals ("param" , args .getString ('x' ));
74+ assertEquals ("param" , args .getValue ('x' ));
7575 assertEquals (2 , args .nextArgument ());
7676 }
7777
@@ -98,7 +98,7 @@ public void testSpacesInFormat() throws Exception {
9898 public void testSimpleIntPresent () throws Exception {
9999 Args args = new Args ("x#" , new String []{"-x" , "42" });
100100 assertTrue (args .has ('x' ));
101- assertEquals (42 , args .getInt ('x' ));
101+ assertEquals (42 , args .getValue ('x' ));
102102 assertEquals (2 , args .nextArgument ());
103103 }
104104
@@ -130,7 +130,7 @@ public void testMissingInteger() {
130130 public void testSimpleDoublePresent () throws Exception {
131131 Args args = new Args ("x##" , new String []{"-x" , "42.3" });
132132 assertTrue (args .has ('x' ));
133- assertEquals (42.3 , args .getDouble ('x' ), .001 );
133+ assertEquals (42.3 , ( Double ) args .getValue ('x' ), .001 );
134134 }
135135
136136 @ Test
@@ -160,7 +160,7 @@ public void testMissingDouble() {
160160 public void testStringArray () throws Exception {
161161 Args args = new Args ("x[*]" , new String []{"-x" , "alpha" });
162162 assertTrue (args .has ('x' ));
163- String [] result = args .getStringArray ('x' );
163+ String [] result = ( String []) args .getValue ('x' );
164164 assertEquals (1 , result .length );
165165 assertEquals ("alpha" , result [0 ]);
166166 }
@@ -180,7 +180,7 @@ public void testMissingStringArrayElement() {
180180 public void manyStringArrayElements () throws Exception {
181181 Args args = new Args ("x[*]" , new String []{"-x" , "alpha" , "-x" , "beta" , "-x" , "gamma" });
182182 assertTrue (args .has ('x' ));
183- String [] result = args .getStringArray ('x' );
183+ String [] result = ( String []) args .getValue ('x' );
184184 assertEquals (3 , result .length );
185185 assertEquals ("alpha" , result [0 ]);
186186 assertEquals ("beta" , result [1 ]);
@@ -191,7 +191,7 @@ public void manyStringArrayElements() throws Exception {
191191 public void MapArgument () throws Exception {
192192 Args args = new Args ("f&" , new String []{"-f" , "key1:val1,key2:val2" });
193193 assertTrue (args .has ('f' ));
194- Map <String , String > map = args .getMap ('f' );
194+ Map <String , String > map = ( Map < String , String >) args .getValue ('f' );
195195 assertEquals ("val1" , map .get ("key1" ));
196196 assertEquals ("val2" , map .get ("key2" ));
197197 }
@@ -205,15 +205,15 @@ public void malFormedMapArgument() throws Exception {
205205 public void oneMapArgument () throws Exception {
206206 Args args = new Args ("f&" , new String []{"-f" , "key1:val1" });
207207 assertTrue (args .has ('f' ));
208- Map <String , String > map = args .getMap ('f' );
208+ Map <String , String > map = ( Map < String , String >) args .getValue ('f' );
209209 assertEquals ("val1" , map .get ("key1" ));
210210 }
211211
212212 @ Test
213213 public void testExtraArguments () throws Exception {
214214 Args args = new Args ("x,y*" , new String []{"-x" , "-y" , "alpha" , "beta" });
215- assertTrue (args .getBoolean ('x' ));
216- assertEquals ("alpha" , args .getString ('y' ));
215+ assertTrue (( Boolean ) args .getValue ('x' ));
216+ assertEquals ("alpha" , args .getValue ('y' ));
217217 assertEquals (3 , args .nextArgument ());
218218 }
219219
@@ -222,8 +222,8 @@ public void testExtraArgumentsThatLookLikeFlags() throws Exception {
222222 Args args = new Args ("x,y" , new String []{"-x" , "alpha" , "-y" , "beta" });
223223 assertTrue (args .has ('x' ));
224224 assertFalse (args .has ('y' ));
225- assertTrue (args .getBoolean ('x' ));
226- assertFalse (args .getBoolean ('y' ));
225+ assertTrue (( Boolean ) args .getValue ('x' ));
226+ assertFalse (( Boolean ) args .getValue ('y' ));
227227 assertEquals (1 , args .nextArgument ());
228228 }
229229}
0 commit comments