Search in sources :

Example 1 with InSequence

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();
}
Also used : RouteBuilder(org.apache.camel.builder.RouteBuilder) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 2 with InSequence

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();
}
Also used : RouteBuilder(org.apache.camel.builder.RouteBuilder) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 3 with InSequence

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();
}
Also used : RouteBuilder(org.apache.camel.builder.RouteBuilder) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 4 with InSequence

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());
}
Also used : File(java.io.File) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 5 with InSequence

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());
}
Also used : StringTokenizer(java.util.StringTokenizer) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Aggregations

InSequence (org.jboss.arquillian.junit.InSequence)103 Test (org.junit.Test)103 Simple (org.apache.deltaspike.data.test.ee7.domain.Simple)18 ModelNode (org.jboss.dmr.ModelNode)14 URL (java.net.URL)13 ModelControllerClient (org.jboss.as.controller.client.ModelControllerClient)8 PartitionManager (org.picketlink.idm.PartitionManager)7 StringTokenizer (java.util.StringTokenizer)6 IdentityManager (org.picketlink.idm.IdentityManager)6 RouteBuilder (org.apache.camel.builder.RouteBuilder)5 House (org.apache.deltaspike.data.test.ee7.domain.House)5 HttpResponse (org.apache.http.HttpResponse)5 HttpGet (org.apache.http.client.methods.HttpGet)5 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)5 ManagementClient (org.jboss.as.arquillian.container.ManagementClient)5 EntityTest (org.jboss.as.test.integration.jpa.hibernate.EntityTest)5 User (org.picketlink.idm.model.basic.User)5 Date (java.util.Date)4 InitialContext (javax.naming.InitialContext)4 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)4