Search in sources :

Example 1 with RequestAndResponse

use of httpstub.RequestAndResponse in project verify-hub by alphagov.

the class MatchingServiceRequestSenderTest method setUpClass.

@BeforeClass
public static void setUpClass() throws Exception {
    JerseyClientConfiguration jerseyClientConfiguration = JerseyClientConfigurationBuilder.aJerseyClientConfiguration().withTimeout(Duration.seconds(10)).build();
    client = new JerseyClientBuilder(samlSoapProxyAppRule.getEnvironment()).using(jerseyClientConfiguration).build(MatchingServiceRequestSenderTest.class.getSimpleName());
    eventSinkStubRule.setupStubForLogging();
    configStub.setupStubForCertificates(TEST_RP_MS);
    String soap = createMsaResponse();
    final String attibute_query_resource = "/attribute-query-request";
    RequestAndResponse requestAndResponse = ExpectedRequestBuilder.expectRequest().withPath(attibute_query_resource).andWillRespondWith().withStatus(200).withBody(soap).withContentType(MediaType.TEXT_XML_TYPE.toString()).build();
    msaStubRule.register(requestAndResponse);
}
Also used : JerseyClientConfiguration(io.dropwizard.client.JerseyClientConfiguration) RequestAndResponse(httpstub.RequestAndResponse) JerseyClientBuilder(io.dropwizard.client.JerseyClientBuilder) BeforeClass(org.junit.BeforeClass)

Aggregations

RequestAndResponse (httpstub.RequestAndResponse)1 JerseyClientBuilder (io.dropwizard.client.JerseyClientBuilder)1 JerseyClientConfiguration (io.dropwizard.client.JerseyClientConfiguration)1 BeforeClass (org.junit.BeforeClass)1