Examples of addArgument()


Examples of com.volantis.mcs.runtime.configuration.MarkupPluginConfiguration.addArgument()

            mpc.setScope(scope);
            for (int j = 0; j < args.size(); j++) {
                ArgumentConfiguration argumentConfiguration =
                        (ArgumentConfiguration) args.get(j);
               
                mpc.addArgument(argumentConfiguration);   
            }
            result.add(mpc);
        }
        return result;
    }
View Full Code Here

Examples of com.xebialabs.overthere.CmdLine.addArgument()

        final String obfuscatedCmd = cmd.toCommandLine(os, true);
        logger.info("Starting command [{}] on [{}]", obfuscatedCmd, this);

        final CmdLine winrsCmd = new CmdLine();
        winrsCmd.addArgument("winrs");
        winrsCmd.addArgument("-remote:" + address + ":" + port);
        winrsCmd.addArgument("-username:" + username);
        winrsCmd.addPassword("-password:" + password);
        if (workingDirectory != null) {
            winrsCmd.addArgument("-directory:" + workingDirectory.getPath());
View Full Code Here

Examples of cz.startnet.utils.pgdiff.schema.PgFunction.addArgument()

            final PgFunction.Argument argument = new PgFunction.Argument();
            argument.setDataType(dataType);
            argument.setDefaultExpression(defaultExpression);
            argument.setMode(mode);
            argument.setName(argumentName);
            function.addArgument(argument);

            if (parser.expectOptional(")")) {
                break;
            } else {
                parser.expect(",");
View Full Code Here

Examples of dijjer.util.ArgParser.addArgument()

  boolean arg3Called = false;
  boolean unmatchedCalled = false;

    public void testParse() throws Exception {
      ArgParser parser = new ArgParser("NAME", false);
      parser.addArgument("arg1", "desc1", new ArgParser.ArgumentAction() {
        public void performAction(String arg) throws Exception {
          arg1Val = arg;
        }
      });
      parser.addArgument("arg2", "desc2", new ArgParser.ArgumentAction() {
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.ArgumentGroup.addArgument()

    public void testFormatHelpWithArgumentGroup()
            throws ArgumentParserException {
        ap.description("This is argparser4j.").epilog("This is epilog.");
        ArgumentGroup group = ap.addArgumentGroup("group1")
                .description("group1 description");
        group.addArgument("--foo");
        assertEquals(String.format(
                  TextHelper.LOCALE_ROOT,
                  "usage: argparse4j [-h] [--foo FOO]%n"
                + "%n"
                + "This is argparser4j.%n"
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.ArgumentParser.addArgument()

    }

    private static Namespace parseCommandLine(String[] args) throws ArgumentParserException {
        String usage = "java -jar " + new JarLocation(CalculatorUser.class);
        ArgumentParser argParser = ArgumentParsers.newArgumentParser(usage).defaultHelp(true);
        argParser.addArgument("config-file").nargs("?").help("yaml configuration file");
        return argParser.parseArgs(args);
    }

    private static CalculatorConfiguration loadConfigFile(String configFile)
            throws IOException, ConfigurationException {
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.MutuallyExclusiveGroup.addArgument()

    }

    @Test
    public void testParseArgsWithMutexGroup() throws ArgumentParserException {
        MutuallyExclusiveGroup group = ap.addMutuallyExclusiveGroup("mutex");
        group.addArgument("--foo");
        group.addArgument("--bar");
        Namespace res = ap.parseArgs("--foo bar".split(" "));
        assertEquals("bar", res.get("foo"));
    }
View Full Code Here

Examples of net.sourceforge.argparse4j.inf.Subparser.addArgument()

    public void testSubparserFormatHelpWithDefaultHelp()
            throws ArgumentParserException {
        ap.addArgument("--bar");
        Subparsers subparsers = ap.addSubparsers();
        Subparser parser = subparsers.addParser("install").defaultHelp(true);
        parser.addArgument("--foo").setDefault("alpha");
        assertEquals(String.format(
                  TextHelper.LOCALE_ROOT,
                  "usage: argparse4j install [-h] [--foo FOO]%n"
                + "%n"
                + "optional arguments:%n"
View Full Code Here

Examples of net.sourceforge.argparse4j.internal.ArgumentParserImpl.addArgument()

                .newArgumentParser("prog", false, "+", "@");
        assertEquals("prog", ap.getProg());
        assertEquals("+", ap.getPrefixChars());
        assertEquals("@", ap.getFromFilePrefixChars());
        // Check +h can be added because addHelp is false
        ap.addArgument("+h");
    }

}
View Full Code Here

Examples of net.sourceforge.cruisecontrol.sourcecontrols.accurev.AccurevCommandline.addArgument()

      // An exception must be thrown.
    }
    hist = AccurevCommand.HIST.create(getMockRunner());
    assertFalse(hist.isSuccess());
    AccurevCommand.HIST.create(getMockRunner());
    hist.addArgument("--thisoptiondoesnotexist");
    hist.run();
    assertFalse(hist.isSuccess());
  }
  /**
   * Checks the command line is built as expected
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.