Add test to check bundle entry path being added to validation messages
This commit is contained in:
parent
b5d6fb4aeb
commit
4cab7f8b80
|
@ -1524,6 +1524,9 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
|
|||
StopWatch stopwatch = new StopWatch();
|
||||
ValidationResult output = myFhirValidator.validateWithResult(bundle);
|
||||
ourLog.info("Validation time: {}", stopwatch);
|
||||
// assert that validation messages include the bundle entry path
|
||||
assertTrue(output.getMessages().stream().anyMatch(message -> message.getLocationString().contains("Bundle.entry[0].resource.ofType(Patient)")));
|
||||
assertTrue(output.getMessages().stream().anyMatch(message -> message.getLocationString().contains("Bundle.entry[1].resource.ofType(Patient)")));
|
||||
// validate
|
||||
List<SingleValidationMessage> all = logResultsAndReturnErrorOnes(output);
|
||||
assertThat(output.getMessages(), hasSize(entriesCount * 2));
|
||||
|
|
Loading…
Reference in New Issue