@Test public void check_80_chars_limit_for_comment() { assertTrue(validationToTest.validate(new MappingEntry("", "", CONST_80_CHARS)).isValid()); assertFalse(validationToTest.validate(new MappingEntry("", "", CONST_80_CHARS+"1")).isValid()); }
@Override protected void validate(ValidationContext<MappingEntry> context) { validateNotNull(context); if (context.isInValid()) { return; } MappingEntry mappingEntry = context.objectToValidate; context.result.addErrors(patternValidation.validate(mappingEntry.getPattern())); context.result.addErrors(replaceValidation.validate(mappingEntry.getReplacement())); context.result.addErrors(commentValidation.validate(mappingEntry.getComment())); }
MappingEntryValidationImpl extends AbstractValidation<MappingEntry> implements MappingEntryValidation { @Override protected void validate(ValidationContext<MappingEntry> context) { validateNotNull(context); if (context.isInValid()) { return; } MappingEntry mappingEntry = context.objectToValidate; context.result.addErrors(patternValidation.validate(mappingEntry.getPattern())); context.result.addErrors(replaceValidation.validate(mappingEntry.getReplacement())); context.result.addErrors(commentValidation.validate(mappingEntry.getComment())); } }
MappingEntryValidationImpl extends AbstractValidation<MappingEntry> implements MappingEntryValidation { @Override protected void validate(ValidationContext<MappingEntry> context) { validateNotNull(context); if (context.isInValid()) { return; } MappingEntry mappingEntry = context.objectToValidate; context.result.addErrors(patternValidation.validate(mappingEntry.getPattern())); context.result.addErrors(replaceValidation.validate(mappingEntry.getReplacement())); context.result.addErrors(commentValidation.validate(mappingEntry.getComment())); }  }
MappingEntryValidationImpl extends AbstractValidation<MappingEntry> implements MappingEntryValidation { @Override protected void validate(ValidationContext<MappingEntry> context) { validateNotNull(context); if (context.isInValid()) { return; } MappingEntry mappingEntry = context.objectToValidate; context.result.addErrors(patternValidation.validate(mappingEntry.getPattern())); context.result.addErrors(replaceValidation.validate(mappingEntry.getReplacement())); context.result.addErrors(commentValidation.validate(mappingEntry.getComment())); }   }
MappingEntryValidationImpl extends AbstractValidation<MappingEntry> implements MappingEntryValidation { @Override protected void validate(ValidationContext<MappingEntry> context) { validateNotNull(context); if (context.isInValid()) { return; } MappingEntry mappingEntry = context.objectToValidate; context.result.addErrors(patternValidation.validate(mappingEntry.getPattern())); context.result.addErrors(replaceValidation.validate(mappingEntry.getReplacement())); context.result.addErrors(commentValidation.validate(mappingEntry.getComment())); }    }