@Test public void having_2_mapping_entries_calls_and_two_good_than_valid() { MappingData data = new MappingData(); data.getEntries().add(entry1); data.getEntries().add(entry2); when(mappingEntryValidation.validate(any())).thenReturn(new ValidationResult()); assertTrue(validationToTest.validate(data).isValid()); }
@Override protected void validate(ValidationContext<MappingData> context) { validateNotNull(context); MappingData data = context.objectToValidate; for (MappingEntry entry: data.getEntries()) { ValidationResult result = mappingEntryValidation.validate(entry); if (result.isValid()) { continue; } addErrorMessage(context,result.getErrorDescription()); } }
MappingDataValidationImpl extends AbstractValidation<MappingData> implements MappingDataValidation { @Override protected void validate(ValidationContext<MappingData> context) { validateNotNull(context); MappingData data = context.objectToValidate; for (MappingEntry entry: data.getEntries()) { ValidationResult result = mappingEntryValidation.validate(entry); if (result.isValid()) { continue; } addErrorMessage(context,result.getErrorDescription()); } } }
MappingDataValidationImpl extends AbstractValidation<MappingData> implements MappingDataValidation { @Override protected void validate(ValidationContext<MappingData> context) { validateNotNull(context); MappingData data = context.objectToValidate; for (MappingEntry entry: data.getEntries()) { ValidationResult result = mappingEntryValidation.validate(entry); if (result.isValid()) { continue; } addErrorMessage(context,result.getErrorDescription()); } }  }
MappingDataValidationImpl extends AbstractValidation<MappingData> implements MappingDataValidation { @Override protected void validate(ValidationContext<MappingData> context) { validateNotNull(context); MappingData data = context.objectToValidate; for (MappingEntry entry: data.getEntries()) { ValidationResult result = mappingEntryValidation.validate(entry); if (result.isValid()) { continue; } addErrorMessage(context,result.getErrorDescription()); } }   }
MappingDataValidationImpl extends AbstractValidation<MappingData> implements MappingDataValidation { @Override protected void validate(ValidationContext<MappingData> context) { validateNotNull(context); MappingData data = context.objectToValidate; for (MappingEntry entry: data.getEntries()) { ValidationResult result = mappingEntryValidation.validate(entry); if (result.isValid()) { continue; } addErrorMessage(context,result.getErrorDescription()); } }    }