()
| 89 | } |
| 90 | |
| 91 | @Test |
| 92 | public void testIssue244() throws Exception { |
| 93 | class P1 {} |
| 94 | class P2 { |
| 95 | @Parameter(names = "--hello") |
| 96 | private int test; |
| 97 | } |
| 98 | P1 p1 = new P1(); |
| 99 | P2 p2 = new P2(); |
| 100 | JCommander j = new JCommander(p1); |
| 101 | j.addCommand("wonderful", p2); |
| 102 | j.setAllowAbbreviatedOptions(true); |
| 103 | j.parse("wond", "--he", "47"); |
| 104 | Assert.assertEquals("wonderful", j.getParsedCommand()); |
| 105 | Assert.assertEquals(47, p2.test); |
| 106 | } |
| 107 | } |
nothing calls this directly
no test coverage detected