Skip to content

Commit

Permalink
adding test for multiple core engine
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveregger authored and qligier committed Feb 21, 2024
1 parent 608da1e commit 4dae35e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,11 @@ public void verifyCachingImplementationGuides() {
assertEquals("n/a", this.getTxServer(contextR4, operationOutcome));

// add new parameters should create a new validation engine for default validation
// operationOutcome = validationClient.validate(resource, profileCore);
// String sessionId3CoreTxNa = getSessionId(contextR4, operationOutcome);
// assertEquals(0, getValidationFailures((OperationOutcome) operationOutcome));
// assertNotEquals(sessionIdCore, sessionId3CoreTxNa);
operationOutcome = validationClient.validate(resource, profileCore, parameters);
String sessionId3CoreTxNa = getSessionId(contextR4, operationOutcome);
assertEquals(0, getValidationFailures((OperationOutcome) operationOutcome));
assertNotEquals(sessionIdCore, sessionId3CoreTxNa);
assertEquals("n/a", this.getTxServer(contextR4, operationOutcome));
}

@Test
Expand Down
22 changes: 19 additions & 3 deletions matchbox-server/validation-fhir-tests.http
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@host = https://test.ahdis.ch/matchboxv3/fhir
### @host = http://localhost:8080/matchboxv3/fhir
### @host = https://test.ahdis.ch/matchboxv3/fhir
@host = http://localhost:8081/matchboxv3/fhir
### @host = http://hapi.fhir.org/baseR4

## No issues detected during validation
### No issues detected during validation
POST {{host}}/$validate?profile=http://hl7.org/fhir/StructureDefinition/Basic HTTP/1.1
Accept: application/fhir+json
Content-Type: application/fhir+xml
Expand All @@ -18,6 +18,22 @@ Content-Type: application/fhir+xml
</code>
</Basic>

### No issues detected during validation
POST {{host}}/$validate?profile=http://hl7.org/fhir/StructureDefinition/Basic&txServer=n/a HTTP/1.1
Accept: application/fhir+json
Content-Type: application/fhir+xml

<Basic xmlns="http://hl7.org/fhir">
<code>
<coding>
<system value="http://snomed.info/sct"/>
<version value="http://snomed.info/sct/731000124108/version/20210201"/>
<code value="132037003"/>
<display value="Pineywoods pig breed"/>
</coding>
</code>
</Basic>

### No issues detected during validation
POST {{host}}/$validate?profile=http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict HTTP/1.1
Accept: application/fhir+json
Expand Down

0 comments on commit 4dae35e

Please sign in to comment.