Search in sources :

Example 46 with InSequence

use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.

the class JtaTransactionalRepositoryAbstractTest method should_save_when_app_scoped_bean_is_found.

@Test
@InSequence(21)
public void should_save_when_app_scoped_bean_is_found() throws Exception {
    // when
    Simple simple = simpleClientApp.createSimple("application scoped");
    Simple found = repository.findOptionalByName("application scoped");
    // then
    assertNotNull(simple);
    assertNotNull(found);
    assertEquals("application scoped", found.getName());
}
Also used : Simple(org.apache.deltaspike.data.test.ee7.domain.Simple) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 47 with InSequence

use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.

the class JtaTransactionalRepositoryAbstractTest method should_save_in_transaction.

@Test
@InSequence(2)
public void should_save_in_transaction() throws Exception {
    // given
    Simple simple = new Simple(NAME);
    // when
    simple = repository.save(simple);
    // then
    assertNotNull(simple.getId());
    assertTrue(wrapper.isRunInTx());
}
Also used : Simple(org.apache.deltaspike.data.test.ee7.domain.Simple) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 48 with InSequence

use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.

the class JtaTransactionalRepositoryAbstractTest method should_find_with_lockmode_in_transaction.

@Test
@InSequence(3)
public void should_find_with_lockmode_in_transaction() throws Exception {
    // when
    Simple simple = repository.findOptionalByName(NAME);
    // then
    assertNotNull(simple);
    assertTrue(wrapper.isRunInTx());
}
Also used : Simple(org.apache.deltaspike.data.test.ee7.domain.Simple) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 49 with InSequence

use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.

the class RequestResponseEventsTest method sendRequest.

@Test
@RunAsClient
@InSequence(2)
public void sendRequest(@ArquillianResource URL contextPath) throws Exception {
    String url = new URL(contextPath, "foobar.txt").toString();
    HttpResponse response = new DefaultHttpClient().execute(new HttpGet(url));
    assertEquals(200, response.getStatusLine().getStatusCode());
}
Also used : HttpGet(org.apache.http.client.methods.HttpGet) HttpResponse(org.apache.http.HttpResponse) URL(java.net.URL) DefaultHttpClient(org.apache.http.impl.client.DefaultHttpClient) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 50 with InSequence

use of org.jboss.arquillian.junit.InSequence in project deltaspike by apache.

the class SessionEventsTest method sendRequestToCreateSession.

/**
     * Now send a request which creates a session
     */
@Test
@RunAsClient
@InSequence(3)
public void sendRequestToCreateSession(@ArquillianResource URL contextPath) throws Exception {
    String url = new URL(contextPath, "create-session").toString();
    HttpResponse response = client.execute(new HttpGet(url));
    assertEquals(200, response.getStatusLine().getStatusCode());
    EntityUtils.consumeQuietly(response.getEntity());
}
Also used : HttpGet(org.apache.http.client.methods.HttpGet) HttpResponse(org.apache.http.HttpResponse) URL(java.net.URL) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Aggregations

InSequence (org.jboss.arquillian.junit.InSequence)157 Test (org.junit.Test)157 Faker (com.github.javafaker.Faker)21 Simple (org.apache.deltaspike.data.test.ee7.domain.Simple)18 ModelNode (org.jboss.dmr.ModelNode)14 URL (java.net.URL)13 HttpResponse (org.apache.http.HttpResponse)10 TakeOffer (io.bisq.api.model.TakeOffer)9 HttpGet (org.apache.http.client.methods.HttpGet)8 ModelControllerClient (org.jboss.as.controller.client.ModelControllerClient)8 OfferToCreate (io.bisq.api.model.OfferToCreate)7 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)7 PartitionManager (org.picketlink.idm.PartitionManager)7 Response (javax.ws.rs.core.Response)6 IdentityManager (org.picketlink.idm.IdentityManager)6 StringTokenizer (java.util.StringTokenizer)5 RouteBuilder (org.apache.camel.builder.RouteBuilder)5 House (org.apache.deltaspike.data.test.ee7.domain.House)5 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)5 ManagementClient (org.jboss.as.arquillian.container.ManagementClient)5