Examples of SlashSeparator


Examples of com.beust.jcommander.args.SlashSeparator

    Assert.assertEquals(s.l.longValue(), 1l);
    Assert.assertEquals(s.level.intValue(), 42);
  }

  public void slashParameters() {
    SlashSeparator a = new SlashSeparator();
    String[] argv = { "/verbose", "/file", "/tmp/a" };
    new JCommander(a, argv);
    Assert.assertTrue(a.verbose);
    Assert.assertEquals(a.file, "/tmp/a");
  }
View Full Code Here

Examples of com.beust.jcommander.args.SlashSeparator

     public boolean verbose = false;

     @Parameter(names = "/file")
     public String file;
    }
    SlashSeparator ss = new SlashSeparator();
    try {
      new JCommander(ss).parse("/notAParam");
    } catch (ParameterException ex) {
      boolean result = ex.getMessage().contains("Unknown option");
      Assert.assertTrue(result);
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.