Search in sources :

Example 1 with BasicValidationHandler

use of org.apache.camel.component.http4.handler.BasicValidationHandler in project camel by apache.

the class HttpDefaultPortNumberTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor()).setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory()).setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).registerHandler("/search", new BasicValidationHandler("GET", null, null, getExpectedContent())).create();
    localServer.start();
    super.setUp();
}
Also used : BasicValidationHandler(org.apache.camel.component.http4.handler.BasicValidationHandler) Before(org.junit.Before)

Example 2 with BasicValidationHandler

use of org.apache.camel.component.http4.handler.BasicValidationHandler in project camel by apache.

the class HttpProducerExplicitConnectionCloseTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor()).setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory()).setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).registerHandler("/myget", new BasicValidationHandler("GET", null, null, getExpectedContent())).create();
    localServer.start();
    super.setUp();
}
Also used : BasicValidationHandler(org.apache.camel.component.http4.handler.BasicValidationHandler) Before(org.junit.Before)

Example 3 with BasicValidationHandler

use of org.apache.camel.component.http4.handler.BasicValidationHandler in project camel by apache.

the class HttpBodyTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    Map<String, String> expectedHeaders = new HashMap<String, String>();
    expectedHeaders.put("Content-Type", "image/jpeg");
    localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor()).setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory()).setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).registerHandler("/post", new BasicValidationHandler("POST", null, getBody(), getExpectedContent())).registerHandler("/post1", new HeaderValidationHandler("POST", null, null, getExpectedContent(), expectedHeaders)).create();
    localServer.start();
    super.setUp();
}
Also used : HashMap(java.util.HashMap) HeaderValidationHandler(org.apache.camel.component.http4.handler.HeaderValidationHandler) BasicValidationHandler(org.apache.camel.component.http4.handler.BasicValidationHandler) Before(org.junit.Before)

Example 4 with BasicValidationHandler

use of org.apache.camel.component.http4.handler.BasicValidationHandler in project camel by apache.

the class HttpNoConnectionTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor()).setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory()).setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).registerHandler("/search", new BasicValidationHandler("GET", null, null, getExpectedContent())).create();
    localServer.start();
    super.setUp();
}
Also used : BasicValidationHandler(org.apache.camel.component.http4.handler.BasicValidationHandler) Before(org.junit.Before)

Example 5 with BasicValidationHandler

use of org.apache.camel.component.http4.handler.BasicValidationHandler in project camel by apache.

the class HttpsSslContextParametersGetTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor()).setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory()).setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).registerHandler("/mail/", new BasicValidationHandler("GET", null, null, getExpectedContent())).create();
    localServer.start();
    super.setUp();
}
Also used : BasicValidationHandler(org.apache.camel.component.http4.handler.BasicValidationHandler) Before(org.junit.Before)

Aggregations

BasicValidationHandler (org.apache.camel.component.http4.handler.BasicValidationHandler)18 Before (org.junit.Before)18 HashMap (java.util.HashMap)1 AuthenticationValidationHandler (org.apache.camel.component.http4.handler.AuthenticationValidationHandler)1 BasicRawQueryValidationHandler (org.apache.camel.component.http4.handler.BasicRawQueryValidationHandler)1 HeaderValidationHandler (org.apache.camel.component.http4.handler.HeaderValidationHandler)1