Add deeper profile testing support

This commit is contained in:
Grahame Grieve 2019-12-07 06:55:58 +11:00
parent c62848a886
commit 5cfa2ffe0d
2 changed files with 9 additions and 1 deletions

View File

@ -154,6 +154,14 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour
if (content.has("profile")) {
List<ValidationMessage> errorsProfile = new ArrayList<ValidationMessage>();
JsonObject profile = content.getAsJsonObject("profile");
if (profile.has("supporting")) {
for (JsonElement e : profile.getAsJsonArray("supporting")) {
String filename = e.getAsString();
String contents = TestingUtilities.loadTestResource("validator", filename);
MetadataResource mr = (MetadataResource) loadResource(filename, contents, v);
val.getContext().cacheResource(mr);
}
}
String filename = profile.get("source").getAsString();
String contents = TestingUtilities.loadTestResource("validator", filename);
System.out.println("Name: " + name+" - profile : "+profile.get("source").getAsString());

View File

@ -17,7 +17,7 @@
<properties>
<hapi_fhir_version>4.1.0</hapi_fhir_version>
<validator_test_case_version>1.0.11-SNAPSHOT</validator_test_case_version>
<validator_test_case_version>1.0.12-SNAPSHOT</validator_test_case_version>
</properties>
<artifactId>org.hl7.fhir.core</artifactId>