@Test public void failsForTypeWithInvalidOtherChar() throws Exception { try { sut.checkType("invalidÓtherChar"); fail("Should fail type check if other char is not valid"); } catch (IllegalArgumentException e) { assertThat(e.getMessage(),equalTo("Invalid character 'Ó' in type 'invalidÓtherChar' at 7")); } }
@Override public void checkType(final String type) { validateLength(type,"Type"); validateFirstChar(type,"type"); validateOtherChars(type,"type"); }
RFC6838MediaRangeValidator implements MediaRangeValidator { @Override public void checkType(final String type) { validateLength(type,"Type"); validateFirstChar(type,"type"); validateOtherChars(type,"type"); } }
RFC6838MediaRangeValidator implements MediaRangeValidator { @Override public void checkType(final String type) { validateLength(type,"Type"); validateFirstChar(type,"type"); validateOtherChars(type,"type"); } RFC6838MediaRangeValidator(); }
RFC6838MediaRangeValidator implements MediaRangeValidator { @Override public void checkType(final String type) { validateLength(type,"Type"); validateFirstChar(type,"type"); validateOtherChars(type,"type"); } RFC6838MediaRangeValidator(); @Override void checkType(final String type); @Override void checkSubType(final String subType); @Override void checkSuffix(final String suffix); }
RFC6838MediaRangeValidator implements MediaRangeValidator { @Override public void checkType(final String type) { validateLength(type,"Type"); validateFirstChar(type,"type"); validateOtherChars(type,"type"); } RFC6838MediaRangeValidator(); @Override void checkType(final String type); @Override void checkSubType(final String subType); @Override void checkSuffix(final String suffix);  }