Search in sources :

Example 46 with Before

use of org.junit.Before in project camel by apache.

the class GroovyExpressionTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    exchange = new DefaultExchange(new DefaultCamelContext());
    exchange.getIn().setHeader("foo.bar", "cheese");
    exchange.getIn().setHeader("name", "James");
}
Also used : DefaultExchange(org.apache.camel.impl.DefaultExchange) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Before(org.junit.Before)

Example 47 with Before

use of org.junit.Before in project camel by apache.

the class CamelComponentVerifierTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    localServer = new Server(PORT);
    localServer.setHandler(handlers(contextHandler("/basic", new BasicValidationHandler("GET", null, null, getExpectedContent()))));
    localServer.start();
    super.setUp();
}
Also used : Server(org.eclipse.jetty.server.Server) BasicValidationHandler(org.apache.camel.component.http.handler.BasicValidationHandler) Before(org.junit.Before)

Example 48 with Before

use of org.junit.Before in project camel by apache.

the class HttpDisableStreamCacheTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    localServer = ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor()).setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory()).setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext()).registerHandler("/test/", 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 49 with Before

use of org.junit.Before in project camel by apache.

the class HttpHeaderFilterStrategyTest method setUp.

@Before
public void setUp() {
    filter = new HttpHeaderFilterStrategy();
    exchange = new DefaultExchange(new DefaultCamelContext());
}
Also used : HttpHeaderFilterStrategy(org.apache.camel.http.common.HttpHeaderFilterStrategy) DefaultExchange(org.apache.camel.impl.DefaultExchange) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Before(org.junit.Before)

Example 50 with Before

use of org.junit.Before 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)

Aggregations

Before (org.junit.Before)8594 File (java.io.File)733 Properties (java.util.Properties)270 Configuration (org.apache.hadoop.conf.Configuration)266 TreeMap (java.util.TreeMap)247 ArrayList (java.util.ArrayList)228 HashMap (java.util.HashMap)162 IOException (java.io.IOException)159 URL (java.net.URL)137 Path (org.apache.hadoop.fs.Path)130 Config (com.hazelcast.config.Config)115 HazelcastInstance (com.hazelcast.core.HazelcastInstance)111 InputStream (java.io.InputStream)109 Date (java.util.Date)96 InvocationOnMock (org.mockito.invocation.InvocationOnMock)96 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)92 YarnConfiguration (org.apache.hadoop.yarn.conf.YarnConfiguration)90 ByteArrayOutputStream (java.io.ByteArrayOutputStream)83 Connection (java.sql.Connection)78 Random (java.util.Random)75