use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxCrudInsertRollbackCrudSelectRollback.
@Test
public void testTxCrudInsertRollbackCrudSelectRollback() {
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
storeManager.getDataStore().create(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 testTxNativeInsertRollbackNativeSelectRollback.
@Test
public void testTxNativeInsertRollbackNativeSelectRollback() {
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
nativeInsertCar(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 initMainStore.
protected void initMainStore() {
// A chaque test on recrée la table famille
SqlUtil.execRequests(transactionManager, taskManager, getCreateMainStoreRequests(), "TK_INIT_MAIN", Optional.empty());
try (VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
for (final Car car : carDataBase.getAllCars()) {
car.setId(null);
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 testTxNativeInsertNativeSelectRollback.
@Test
public void testTxNativeInsertNativeSelectRollback() {
try (final VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
nativeInsertCar(car);
// on récupère la liste des voitures
checkNativeCarsCount(1);
}
}
use of io.vertigo.dynamo.store.data.domain.car.Car in project vertigo by KleeGroup.
the class AbstractStoreManagerTest method testTxCrudInsertNativeSelectRollback.
@Test
public void testTxCrudInsertNativeSelectRollback() {
try (final VTransactionWritable transaction = transactionManager.createCurrentTransaction()) {
final Car car = createNewCar();
storeManager.getDataStore().create(car);
// on récupère la liste des voitures
checkNativeCarsCount(1);
}
}
Aggregations