Search in sources :

Example 16 with Simple

use of org.apache.deltaspike.data.test.ee7.domain.Simple in project deltaspike by apache.

the class DeltaSpikeTransactionalRepositoryInterfaceTest 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 Simple

use of org.apache.deltaspike.data.test.ee7.domain.Simple in project deltaspike by apache.

the class JtaTransactionalRepositoryAbstractTest method dep_scoped_bean_should_be_empty_before_tx.

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

Example 18 with Simple

use of org.apache.deltaspike.data.test.ee7.domain.Simple in project deltaspike by apache.

the class JtaTransactionalRepositoryAbstractTest method tx_scoped_bean_should_be_empty_before_tx.

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

Example 19 with Simple

use of org.apache.deltaspike.data.test.ee7.domain.Simple in project deltaspike by apache.

the class JtaTransactionalRepositoryAbstractTest method app_scoped_bean_should_be_empty_before_tx.

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

Example 20 with Simple

use of org.apache.deltaspike.data.test.ee7.domain.Simple in project deltaspike by apache.

the class JtaTransactionalRepositoryAbstractTest method app_scoped_bean_should_not_be_empty_after_tx.

@Test
@InSequence(22)
public void app_scoped_bean_should_not_be_empty_after_tx() throws Exception {
    // when
    Simple simple = simpleClientApp.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)

Aggregations

Simple (org.apache.deltaspike.data.test.ee7.domain.Simple)21 InSequence (org.jboss.arquillian.junit.InSequence)18 Test (org.junit.Test)18