Examples of specs()


Examples of joptsimple.OptionSet.specs()

  @Test
  public void acceptsShortcutForVaultOption() {
    final OptionSet optionSet = optionsParser.parse(new String[] { "-v", "vaultname", "--endpoint",
        "file:///endpointurl" });
    assertTrue("Option 'vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("vault"));
    assertEquals("Value of option 'vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        "vaultname", optionSet.valueOf("vault"));
  }
View Full Code Here

Examples of joptsimple.OptionSet.specs()

  public void acceptsShortcutForVaultOption() {
    final OptionSet optionSet = optionsParser.parse(new String[] { "-v", "vaultname", "--endpoint",
        "file:///endpointurl" });
    assertTrue("Option 'vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("vault"));
    assertEquals("Value of option 'vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        "vaultname", optionSet.valueOf("vault"));
  }

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

Examples of joptsimple.OptionSet.specs()

  }

  @Test
  public void hasRequiredVaultOptionWithName() {
    final OptionSet optionSet = optionsParser.parse(args);
    assertTrue("Option 'vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("vault"));
    assertEquals("Value of option 'vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        "vaultname", optionSet.valueOf("vault"));
  }
View Full Code Here

Examples of joptsimple.OptionSet.specs()

  @Test
  public void hasRequiredVaultOptionWithName() {
    final OptionSet optionSet = optionsParser.parse(args);
    assertTrue("Option 'vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("vault"));
    assertEquals("Value of option 'vault' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        "vaultname", optionSet.valueOf("vault"));
  }

  @Test
  public void hasRequiredEndpointOptionWithUrl() throws MalformedURLException {
View Full Code Here

Examples of joptsimple.OptionSet.specs()

  }

  @Test
  public void hasRequiredEndpointOptionWithUrl() throws MalformedURLException {
    final OptionSet optionSet = optionsParser.parse(args);
    assertTrue("Option 'endpoint' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("endpoint"));
    assertEquals("Value of option 'endpoint' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        "file:///endpointurl", optionSet.valueOf("endpoint"));
  }
View Full Code Here

Examples of joptsimple.OptionSet.specs()

  @Test
  public void hasRequiredEndpointOptionWithUrl() throws MalformedURLException {
    final OptionSet optionSet = optionsParser.parse(args);
    assertTrue("Option 'endpoint' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("endpoint"));
    assertEquals("Value of option 'endpoint' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        "file:///endpointurl", optionSet.valueOf("endpoint"));
  }

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

Examples of joptsimple.OptionSet.specs()

    final String[] newArgs = Arrays.copyOf(args, args.length + 2);
    newArgs[newArgs.length - 2] = "--credentials";
    newArgs[newArgs.length - 1] = "/path/to/aws.properties";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'credentials' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("credentials"));
    assertEquals("Value of option 'credentials' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        new File("/path/to/aws.properties"), optionSet.valueOf("credentials"));
  }
View Full Code Here

Examples of joptsimple.OptionSet.specs()

    newArgs[newArgs.length - 1] = "/path/to/aws.properties";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'credentials' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("credentials"));
    assertEquals("Value of option 'credentials' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        new File("/path/to/aws.properties"), optionSet.valueOf("credentials"));
  }

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

Examples of joptsimple.OptionSet.specs()

    final String[] newArgs = Arrays.copyOf(args, args.length + 2);
    newArgs[newArgs.length - 2] = "--upload";
    newArgs[newArgs.length - 1] = "/path/to/file";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'upload' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("upload"));
    assertEquals("Value of option 'upload' not found in " + Arrays.deepToString(optionSet.specs().toArray()), new File(
        "/path/to/file"), optionSet.valueOf("upload"));
  }
View Full Code Here

Examples of joptsimple.OptionSet.specs()

    newArgs[newArgs.length - 1] = "/path/to/file";

    final OptionSet optionSet = optionsParser.parse(newArgs);
    assertTrue("Option 'upload' not found in " + Arrays.deepToString(optionSet.specs().toArray()),
        optionSet.has("upload"));
    assertEquals("Value of option 'upload' not found in " + Arrays.deepToString(optionSet.specs().toArray()), new File(
        "/path/to/file"), optionSet.valueOf("upload"));
  }

  @Test
  public void hasActionOptionListInventory() {
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.