Java Collections.assertOptionDetected Examples

Java Collections.assertOptionDetected - 2 examples found. These are the top rated real world Java examples of java.util.Collections.assertOptionDetected extracted from open source projects. You can rate examples to help us improve the quality of examples.
  @Test
  public void abbreviation() {
    OptionSet options = parser.parse("--W", "silent");

    assertOptionDetected(options, "Wally");
    assertOptionNotDetected(options, "W");
    assertEquals(singletonList("silent"), options.valuesOf("Wally"));
    assertEquals(emptyList(), options.nonOptionArguments());
  }
  @Test
  public void wExtensionWithLongOptionWithoutAnArgument() {
    OptionSet options = parser.parse("-W", "silent");

    assertOptionNotDetected(options, "W");
    assertOptionDetected(options, "silent");
    assertEquals(emptyList(), options.valuesOf("silent"));
    assertEquals(emptyList(), options.nonOptionArguments());
  }