use of se.inera.intyg.webcert.web.integration.integrationtest.BodyExtractorFilter in project webcert by sklintyg.
the class CreateDraftCertificateV1IT method setup.
@Before
public void setup() throws IOException {
// Setup String template resource
templateGroup = new STGroupFile("integrationtestTemplates/createDraftCertificate.v1.stg");
requestTemplate = templateGroup.getInstanceOf("request");
xsdInputstream = ClasspathSchemaResourceResolver.load("interactions/CreateDraftCertificateInteraction/CreateDraftCertificateResponder_1.0.xsd");
// We want to validate against the body of the response, and not the entire soap response. This filter will
// extract that for us.
responseBodyExtractorFilter = new BodyExtractorFilter(ImmutableMap.of("lc", "urn:riv:clinicalprocess:healthcond:certificate:CreateDraftCertificateResponder:1"), "soap:Envelope/soap:Body/lc:CreateDraftCertificateResponse");
// Make a dummy request, ignore response...
given().get("/services").then().statusCode(greaterThan(199));
}
use of se.inera.intyg.webcert.web.integration.integrationtest.BodyExtractorFilter in project webcert by sklintyg.
the class CreateDraftCertificateV3IT method setup.
@Before
public void setup() throws IOException {
// Setup String template resource
templateGroup = new STGroupFile("integrationtestTemplates/createDraftCertificate.v3.stg");
requestTemplate = templateGroup.getInstanceOf("request");
xsdInputstream = ClasspathSchemaResourceResolver.load("interactions/CreateDraftCertificateInteraction/CreateDraftCertificateResponder_3.1.xsd");
// We want to validate against the body of the response, and not the entire soap response. This filter will
// extract that for us.
responseBodyExtractorFilter = new BodyExtractorFilter(ImmutableMap.of("lc", "urn:riv:clinicalprocess:healthcond:certificate:CreateDraftCertificateResponder:3"), "soap:Envelope/soap:Body/lc:CreateDraftCertificateResponse");
}
Aggregations