use of org.jboss.arquillian.junit.InSequence in project camel by apache.
the class AdvisedMockEndpointProducerTest method startCamelContext.
@Test
@InSequence(1)
public void startCamelContext(CamelContext context) throws Exception {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
interceptSendToEndpoint("mock:outbound").skipSendToOriginalEndpoint().log("Intercepting message [${body}] from mock endpoint").to("mock:intercepted");
from("direct:inbound").to("mock:outbound");
}
});
context.startAllRoutes();
}
use of org.jboss.arquillian.junit.InSequence in project camel by apache.
the class MultiCamelContextTest method configureCamelContexts.
@Test
@InSequence(2)
public void configureCamelContexts() throws Exception {
secondCamelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from("direct:inbound").setHeader("context").constant("second").to("mock:outbound");
}
});
secondCamelContext.startAllRoutes();
}
use of org.jboss.arquillian.junit.InSequence in project camel by apache.
the class MultiContextPropertyInjectTest method configureCamelContexts.
@Test
@InSequence(1)
public void configureCamelContexts() throws Exception {
defaultCamelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from("direct:in").bean(PropertyInjectBean.class).to("mock:out");
}
});
firstCamelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from("direct:in").bean(FirstCamelContextPropertyInjectBean.class).to("mock:out");
}
});
secondCamelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from("direct:in").bean(SecondCamelContextPropertyInjectBean.class).to("mock:out");
}
});
secondCamelContext.startAllRoutes();
}
use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.
the class FileWatcherTest method should_react_on_new_pdf_file_arriving_in_the_folder.
@Test
@InSequence(2)
public void should_react_on_new_pdf_file_arriving_in_the_folder() throws Exception {
// given
File tempFile = new File("/tmp", "pdf-test-creation" + System.currentTimeMillis() + ".pdf");
tempFile.createNewFile();
tempFile.deleteOnExit();
// when
await().atMost(TEN_SECONDS).with().pollInterval(FIVE_HUNDRED_MILLISECONDS).until(fileEventObserved());
// then
assertThat(tempFile.getName()).isEqualTo(observedFileEvent.getFile().getName());
assertThat(FileEvent.Type.CREATED).isEqualTo(observedFileEvent.getType());
}
use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.
the class AnnotatedSingletonResourceTest method testPut.
@Test
@InSequence(4)
public void testPut() {
target.request().put(Entity.text("apple"));
String list = target.request().get(String.class);
StringTokenizer tokens = new StringTokenizer(list, ",");
assertEquals(4, tokens.countTokens());
}
Aggregations