Improve validation messages
This commit is contained in:
parent
4dbd180cf6
commit
8794de7a22
|
@ -39,7 +39,7 @@ public class BearerTokenAuthInterceptorTest {
|
||||||
public void before() {
|
public void before() {
|
||||||
myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs());
|
myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs());
|
||||||
ourCtx.getRestfulClientFactory().setHttpClient(myHttpClient);
|
ourCtx.getRestfulClientFactory().setHttpClient(myHttpClient);
|
||||||
ourCtx.getRestfulClientFactory().setServerValidationModeEnum(ServerValidationModeEnum.NEVER);
|
ourCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER);
|
||||||
|
|
||||||
myHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs());
|
myHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs());
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,6 +189,13 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
|
||||||
throw new IllegalArgumentException("Unknown encoding: " + theEncoding);
|
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;
|
return messages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -230,7 +230,7 @@ public class FhirInstanceValidatorTest {
|
||||||
.toString(FhirInstanceValidator.class.getResourceAsStream("/medicationstatement_invalidelement.xml"));
|
.toString(FhirInstanceValidator.class.getResourceAsStream("/medicationstatement_invalidelement.xml"));
|
||||||
ValidationResult output = myVal.validateWithResult(input);
|
ValidationResult output = myVal.validateWithResult(input);
|
||||||
|
|
||||||
List<SingleValidationMessage> res = logResultsAndReturnNonInformationalOnes(output);
|
List<SingleValidationMessage> res = logResultsAndReturnAll(output);
|
||||||
ourLog.info(res.toString());
|
ourLog.info(res.toString());
|
||||||
|
|
||||||
for (SingleValidationMessage nextMessage : res) {
|
for (SingleValidationMessage nextMessage : res) {
|
||||||
|
|
Loading…
Reference in New Issue