Search in sources :

Example 6 with InSequence

use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.

the class AnnotatedSingletonResourceTest method testPost.

@Test
@InSequence(1)
public void testPost() {
    target.request().post(Entity.text("pineapple"));
    target.request().post(Entity.text("mango"));
    target.request().post(Entity.text("kiwi"));
    target.request().post(Entity.text("passion fruit"));
    String list = target.request().get(String.class);
    System.out.println("--> " + list);
    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)

Example 7 with InSequence

use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.

the class AnnotatedSingletonResourceTest method testDelete.

@Test
@InSequence(3)
public void testDelete() {
    target.path("kiwi").request().delete();
    String list = target.request().get(String.class);
    StringTokenizer tokens = new StringTokenizer(list, ",");
    assertEquals(3, tokens.countTokens());
}
Also used : StringTokenizer(java.util.StringTokenizer) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 8 with InSequence

use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.

the class ApplicationSingletonResourceTest 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)

Example 9 with InSequence

use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.

the class ApplicationSingletonResourceTest method testPost.

@Test
@InSequence(1)
public void testPost() {
    target.request().post(Entity.text("pineapple"));
    target.request().post(Entity.text("mango"));
    target.request().post(Entity.text("kiwi"));
    target.request().post(Entity.text("passion fruit"));
    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)

Example 10 with InSequence

use of org.jboss.arquillian.junit.InSequence in project javaee7-samples by javaee-samples.

the class FileWatcherTest method should_react_on_new_text_file_arriving_in_the_folder.

@Test
@InSequence(1)
public void should_react_on_new_text_file_arriving_in_the_folder() throws Exception {
    // given
    File tempFile = new File("/tmp", "test.txt");
    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)

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