Search in sources :

Example 21 with Before

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

the class AbstractDirectVmTestSupport method setUp.

@Override
@Before
protected void setUp() throws Exception {
    super.setUp();
    doPostSetup();
    context2 = new DefaultCamelContext();
    template2 = context2.createProducerTemplate();
    ServiceHelper.startServices(template2, context2);
    // add routes after CamelContext has been started
    RouteBuilder routeBuilder = createRouteBuilderForSecondContext();
    if (routeBuilder != null) {
        context2.addRoutes(routeBuilder);
    }
}
Also used : RouteBuilder(org.apache.camel.builder.RouteBuilder) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Before(org.junit.Before)

Example 22 with Before

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

the class AbstractVmTestSupport method setUp.

@Override
@Before
protected void setUp() throws Exception {
    super.setUp();
    context2 = new DefaultCamelContext();
    template2 = context2.createProducerTemplate();
    ServiceHelper.startServices(template2, context2);
    // add routes after CamelContext has been started
    RouteBuilder routeBuilder = createRouteBuilderForSecondContext();
    if (routeBuilder != null) {
        context2.addRoutes(routeBuilder);
    }
}
Also used : RouteBuilder(org.apache.camel.builder.RouteBuilder) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Before(org.junit.Before)

Example 23 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 : DefaultExchange(org.apache.camel.impl.DefaultExchange) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Before(org.junit.Before)

Example 24 with Before

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

the class SelectCommandTest method setUp.

@Before
public void setUp() {
    sdbClient = new AmazonSDBClientMock();
    configuration = new SdbConfiguration();
    configuration.setDomainName("DOMAIN1");
    configuration.setConsistentRead(Boolean.TRUE);
    exchange = new DefaultExchange(new DefaultCamelContext());
    command = new SelectCommand(sdbClient, configuration, exchange);
}
Also used : DefaultExchange(org.apache.camel.impl.DefaultExchange) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) Before(org.junit.Before)

Example 25 with Before

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

the class S3ComponentFileTest method setup.

@Before
public void setup() throws Exception {
    super.setUp();
    testFile = FileUtil.createTempFile("test", "file");
    FileWriter writer = new FileWriter(testFile);
    writer.write("This is my bucket content.");
    writer.close();
}
Also used : FileWriter(java.io.FileWriter) 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