use of org.apache.deltaspike.data.test.ee7.domain.Simple 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());
}
use of org.apache.deltaspike.data.test.ee7.domain.Simple 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());
}
use of org.apache.deltaspike.data.test.ee7.domain.Simple 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());
}
use of org.apache.deltaspike.data.test.ee7.domain.Simple 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());
}
use of org.apache.deltaspike.data.test.ee7.domain.Simple in project deltaspike by apache.
the class SimpleClientApp method createSimple.
public Simple createSimple(String name) {
Simple simple = new Simple(name);
simpleHolder.setSimple(simple);
return repo.saveOnMatchApp(simple);
}
Aggregations