use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxCrudInsertRollbackNativeSelectRollback.
@Test
public void testTxCrudInsertRollbackNativeSelectRollback() {
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
storeManager.getDataStore().create(car);
}
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
checkNativeCarsCount(0);
}
}
use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxCrudInsertTwoCommit.
@Test(expected = IllegalStateException.class)
public void testTxCrudInsertTwoCommit() {
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
storeManager.getDataStore().create(car);
transaction.commit();
transaction.commit();
}
}
use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxNativeInsertCrudInsertCommit.
@Test
public void testTxNativeInsertCrudInsertCommit() {
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
final Car car2 = createNewCar();
nativeInsertCar(car2);
storeManager.getDataStore().create(car);
transaction.commit();
}
}
use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testNativeInsertNoTx.
@Test(expected = NullPointerException.class)
public void testNativeInsertNoTx() {
final Car car = createNewCar();
nativeInsertCar(car);
}
use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxNativeInsertCrudSelectRollback.
@Test
public void testTxNativeInsertCrudSelectRollback() {
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
nativeInsertCar(car);
// on récupère la liste des voitures
checkCrudCarsCount(1);
}
}
Aggregations