use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxCrudLockCommit.
@Test
public void testTxCrudLockCommit() {
final Car car = createNewCar();
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car createdCar = storeManager.getDataStore().create(car);
// Check cars count
checkCrudCarsCount(1);
storeManager.getDataStore().readOneForUpdate(createdCar.getURI());
checkCrudCarsCount(1);
transaction.commit();
}
}
use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxCrudInsertCommitCrudDeleteCommit.
@Test
public void testTxCrudInsertCommitCrudDeleteCommit() {
final Car car = createNewCar();
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
storeManager.getDataStore().create(car);
checkCrudCarsCount(1);
transaction.commit();
}
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
storeManager.getDataStore().delete(car.getURI());
checkCrudCarsCount(0);
transaction.commit();
}
}
use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxCrudInsertCrudSelectRollback.
@Test
public void testTxCrudInsertCrudSelectRollback() {
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
storeManager.getDataStore().create(car);
// on récupère la liste des voitures
checkCrudCarsCount(1);
}
}
use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxNativeInsertRollbackCrudSelectRollback.
@Test
public void testTxNativeInsertRollbackCrudSelectRollback() {
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
nativeInsertCar(car);
}
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
// on récupère la liste des voitures
checkCrudCarsCount(0);
}
}
use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxCrudInsertCommitNativeSelectRollback.
@Test
public void testTxCrudInsertCommitNativeSelectRollback() {
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
storeManager.getDataStore().create(car);
transaction.commit();
}
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
// on récupère la liste des voitures
checkNativeCarsCount(1);
}
}
Aggregations