Examples of specs()


Examples of joptsimple.OptionSet.specs()

  public void hasActionOptionListInventory() {
    final String[] newArgs = Arrays.copyOf(args, args.length + 1);
    newArgs[newArgs.length - 1] = "--list-inventory";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'list-inventory' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("list-inventory"));
  }

  @Test
  public void hasActionOptionListInventoryWithJobId() {
View Full Code Here

Examples of joptsimple.OptionSet.specs()

    final String[] newArgs = Arrays.copyOf(args, args.length + 2);
    newArgs[newArgs.length - 2] = "--list-inventory";
    newArgs[newArgs.length - 1] = "inventory-job-id";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'list-inventory' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("list-inventory"));
    if (optionSet.hasArgument(optionsParser.INVENTORY_LISTING)) {
      assertEquals("Value of option 'list-inventory' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
          "inventory-job-id", optionSet.valueOf("list-inventory"));
    }
View Full Code Here

Examples of joptsimple.OptionSet.specs()

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'list-inventory' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("list-inventory"));
    if (optionSet.hasArgument(optionsParser.INVENTORY_LISTING)) {
      assertEquals("Value of option 'list-inventory' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
          "inventory-job-id", optionSet.valueOf("list-inventory"));
    }
  }

  @Test
View Full Code Here

Examples of joptsimple.OptionSet.specs()

    final String[] newArgs = Arrays.copyOf(args, args.length + 2);
    newArgs[newArgs.length - 2] = "--download";
    newArgs[newArgs.length - 1] = "myarchiveid";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'download' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("download"));
    assertEquals("Value of option 'download' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        "myarchiveid", optionSet.valueOf("download"));
  }
View Full Code Here

Examples of joptsimple.OptionSet.specs()

    newArgs[newArgs.length - 1] = "myarchiveid";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'download' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("download"));
    assertEquals("Value of option 'download' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        "myarchiveid", optionSet.valueOf("download"));
  }

  @Test
  public void hasActionOptionCreateVault() {
View Full Code Here

Examples of joptsimple.OptionSet.specs()

  public void hasActionOptionCreateVault() {
    final String[] newArgs = Arrays.copyOf(args, args.length + 1);
    newArgs[newArgs.length - 1] = "--create";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'create' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("create"));
  }

  @Test
  public void hasActionOptionDeleteArchive() {
View Full Code Here

Examples of joptsimple.OptionSet.specs()

    final String[] newArgs = Arrays.copyOf(args, args.length + 2);
    newArgs[newArgs.length - 2] = "--delete";
    newArgs[newArgs.length - 1] = "myarchiveid";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'delete' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("delete"));
    assertEquals("Value of option 'delete' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        "myarchiveid", optionSet.valueOf("delete"));
  }
View Full Code Here

Examples of joptsimple.OptionSet.specs()

    newArgs[newArgs.length - 1] = "myarchiveid";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'delete' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("delete"));
    assertEquals("Value of option 'delete' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        "myarchiveid", optionSet.valueOf("delete"));
  }

  @Test
  public void hasActionOptionDeleteVault() {
View Full Code Here

Examples of joptsimple.OptionSet.specs()

  public void hasActionOptionDeleteVault() {
    final String[] newArgs = Arrays.copyOf(args, args.length + 1);
    newArgs[newArgs.length - 1] = "--delete-vault";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'delete-vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("delete-vault"));
  }

  @Test
  public void hasActionOptionCalculateHash() {
View Full Code Here

Examples of joptsimple.OptionSet.specs()

    final String[] newArgs = Arrays.copyOf(args, args.length + 2);
    newArgs[newArgs.length - 2] = "--calculate";
    newArgs[newArgs.length - 1] = "inventorylisting.txt";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'calculate' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("calculate"));
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.