ArgumentParser { public void throwOnUnvalidSeenTagWithValue(String... validTags) throws SyntaxException { validateTagCollectionWithExpectations(tagsWithValues.keySet(), validTags); } ArgumentParser(List<Argument> arguments); void initialize(List<Argument> arguments); String getStringValueForTag(String tag, String exceptionMessage); Integer getNumericValueForTag(String tag, String exceptionMessage); List<String> getStringListForTag(String tag, String exceptionMessage); Set<String> getSingleTags(); String getRemainingStringValue(String exceptionMessage); void throwOnUnvalidSeenSingleTag(String... validTags); void throwOnUnvalidSeenTagWithValue(String... validTags);  }
@Test public void validateTagsWithValueShouldNotThrowByDefault() throws Exception { ArgumentParser argumentParser = new ArgumentParser(Lists.<Argument>newArrayList()); argumentParser.throwOnUnvalidSeenTagWithValue(); }
@Test public void validateTagsWithValueShouldNotThrowWhenAllowedValuesAreNotPresent() throws Exception { ArgumentParser argumentParser = new ArgumentParser(Lists.<Argument>newArrayList()); argumentParser.throwOnUnvalidSeenTagWithValue(ANY_TAG); }
@Test public void validateTagsWithValueShouldNotThrowOnSingleTag() throws Exception { ArgumentParser argumentParser = new ArgumentParser(Lists.<Argument>newArrayList(ANY_TAG_ARGUMENT)); argumentParser.throwOnUnvalidSeenTagWithValue(); }
@Test(expected = SyntaxException.class) public void validateTagsWithValueShouldThrowOnUnexpectedTagWithValue() throws Exception { ArgumentParser argumentParser = new ArgumentParser(Lists.newArrayList(OTHER_TAG_ARGUMENT, NUMBER_ARGUMENT)); argumentParser.throwOnUnvalidSeenTagWithValue(ANY_TAG); }