Search in sources :

Example 16 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 17 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 18 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 19 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)

Example 20 with InSequence

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

the class TransactionalQueryRunnerTest method should_find_with_lockmode_in_transaction.

@Test
@InSequence(3)
public void should_find_with_lockmode_in_transaction() throws Exception {
    // when
    Simple simple = repository.findByName(NAME);
    // then
    assertNotNull(simple);
    assertTrue(wrapper.isRunInTx());
}
Also used : Simple(org.apache.deltaspike.data.test.domain.Simple) 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