Improve validation messages

This commit is contained in:
James Agnew 2015-10-08 18:31:30 -04:00
parent 4dbd180cf6
commit 8794de7a22
3 changed files with 9 additions and 2 deletions

View File

@ -39,7 +39,7 @@ public class BearerTokenAuthInterceptorTest {
public void before() {
myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs());
ourCtx.getRestfulClientFactory().setHttpClient(myHttpClient);
ourCtx.getRestfulClientFactory().setServerValidationModeEnum(ServerValidationModeEnum.NEVER);
ourCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER);
myHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs());
}

View File

@ -189,6 +189,13 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
throw new IllegalArgumentException("Unknown encoding: " + theEncoding);
}
for (int i = 0; i < messages.size(); i++) {
ValidationMessage next = messages.get(i);
if ("Binding has no source, so can't be checked".equals(next.getMessage())) {
messages.remove(i);
i--;
}
}
return messages;
}

View File

@ -230,7 +230,7 @@ public class FhirInstanceValidatorTest {
.toString(FhirInstanceValidator.class.getResourceAsStream("/medicationstatement_invalidelement.xml"));
ValidationResult output = myVal.validateWithResult(input);
List<SingleValidationMessage> res = logResultsAndReturnNonInformationalOnes(output);
List<SingleValidationMessage> res = logResultsAndReturnAll(output);
ourLog.info(res.toString());
for (SingleValidationMessage nextMessage : res) {