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