コード例 #1
0
 @Test
 public void testTokenAndOptionAndPassword() {
   assertTrue(
       shell.config(
           "--fake",
           "-tc",
           PasswordToken.class.getCanonicalName(),
           "-l",
           "password=foo",
           "-p",
           "bar"));
   assertTrue(output.get().contains(ParameterException.class.getCanonicalName()));
 }
コード例 #2
0
 @Test
 public void testBadArg() {
   assertTrue(shell.config("--bogus"));
   assertTrue("Did not print usage", output.get().startsWith("Usage"));
 }
コード例 #3
0
 @Test
 public void testToken() {
   assertTrue(shell.config("--fake", "-tc", PasswordToken.class.getCanonicalName()));
   assertTrue(output.get().contains(ParameterException.class.getCanonicalName()));
 }
コード例 #4
0
 @Test
 public void testHelp() {
   assertTrue(shell.config("--help"));
   assertTrue("Did not print usage", output.get().startsWith("Usage"));
 }