1 | assertEquals(((CLOption) clOptions.get(5)).getDescriptor().getId(), CLEAR3_OPT);↵ | | 1 | assertEquals(((CLOption) clOptions.get(2)).getDescriptor().getId(), ALL_OPT);↵
|
2 | assertEquals(((CLOption) clOptions.get(6)).getDescriptor().getId(), CLEAR5_OPT);↵ | | 2 | assertEquals(((CLOption) clOptions.get(3)).getDescriptor().getId(), BLEE_OPT);↵
|
3 | assertEquals(((CLOption) clOptions.get(7)).getDescriptor().getId(), 0);↵ | | 3 | assertEquals(((CLOption) clOptions.get(4)).getDescriptor().getId(), 0);↵
|
4 | }↵ | | 4 | }↵
|
|
5 | public void testDuplicateOptions() {↵ | | 5 | public void test↵
|
6 | // "-Dstupid=idiot","are","--all","--all","here"↵ | | 6 | SingleArg() {↵
|
7 | final CLOptionDescriptor[] options = new CLOptionDescriptor[] { DEFINE, ALL, CLEAR1 };↵ | | 7 | final CLOptionDescriptor[] options = new CLOptionDescriptor[] { FILE };↵
|
|
8 | final CLArgsParser parser = new CLArgsParser(ARGLIST3, options);↵ | | 8 | final CLArgsParser parser = new CLArgsParser(ARGLIST5, options);↵
|
|
9 | assertNull(parser.getErrorString(), parser.getErrorString());↵ | | 9 | assertNull(parser.getErrorString(), parser.getErrorString());↵
|
|
10 | final List clOptions = parser.getArguments();↵ | | 10 | final List clOptions = parser.getArguments();↵
|
11 | final int size = clOptions.size();↵ | | 11 | final int size = clOptions.size();↵
|
|
12 | assertEquals(size, 5);↵ | | 12 | assertEquals(size, 1);↵
|
13 | assertEquals(((CLOption) clOptions.get(0)).getDescriptor().getId(), DEFINE_OPT);↵ | | 13 | assertEquals(((CLOption) clOptions.get(0)).getDescriptor().getId(), FILE_OPT);↵
|
14 | assertEquals | | 14 | assertEquals
|