Search in sources :

Example 41 with InSequence

use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.

the class ImplementValidityAuditStrategyTestCase method testEnversforValidityStrategy.

@Test
@InSequence(1)
public void testEnversforValidityStrategy() throws Exception {
    SLSBValidityStrategyOrg slsbvalidityOrg = lookup("SLSBValidityStrategyOrg", SLSBValidityStrategyOrg.class);
    Organization o1 = slsbvalidityOrg.createOrg("REDHAT", "Software Co", "10/10/1994", "eternity", "Raleigh");
    Organization o2 = slsbvalidityOrg.createOrg("HALDIRAMS", "Food Co", "10/10/1974", "eternity", "Delhi");
    o2.setStartDate("10/10/1924");
    o2.setName("BIKANER");
    slsbvalidityOrg.updateOrg(o2);
    Organization ret1 = slsbvalidityOrg.retrieveOldOrgbyId(o2.getId());
    // check that property startDate is audited
    Assert.assertEquals("10/10/1974", ret1.getStartDate());
    Assert.assertEquals("HALDIRAMS", ret1.getName());
    // check that property location is notaudited
    Assert.assertNull(ret1.getLocation());
}
Also used : SLSBValidityStrategyOrg(org.jboss.as.test.integration.jpa.hibernate.envers.SLSBValidityStrategyOrg) Organization(org.jboss.as.test.integration.jpa.hibernate.envers.Organization) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 42 with InSequence

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

the class JtaTransactionalRepositoryAbstractTest method dep_scoped_bean_should_be_empty_after_tx.

@Test
@InSequence(32)
public void dep_scoped_bean_should_be_empty_after_tx() throws Exception {
    // when
    Simple simple = simpleClientDep.getSimple();
    // then
    assertNotNull(simple);
}
Also used : Simple(org.apache.deltaspike.data.test.ee7.domain.Simple) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 43 with InSequence

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

the class JtaTransactionalRepositoryAbstractTest method should_save_when_dep_scoped_bean_is_found.

@Test
@InSequence(31)
public void should_save_when_dep_scoped_bean_is_found() throws Exception {
    // when
    Simple simple = simpleClientDep.createSimple("dependent");
    Simple found = repository.findOptionalByName("dependent");
    // then
    assertNull(simple);
    assertNull(found);
}
Also used : Simple(org.apache.deltaspike.data.test.ee7.domain.Simple) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 44 with InSequence

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

the class JtaTransactionalRepositoryInterfaceTest 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 45 with InSequence

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

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

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