use of org.qi4j.index.rdf.qi64.AccountComposite in project qi4j-sdk by Qi4j.
the class IssueTest method testUnitOfWorkWithUnitOfWorkInitialized.
@Test
public final void testUnitOfWorkWithUnitOfWorkInitialized() throws Throwable {
// Bootstrap the account
String id = newQi4jAccount();
// Make sure there's no unit of work
assertFalse(module.isUnitOfWorkActive());
UnitOfWork parentUnitOfWork = module.newUnitOfWork();
AccountComposite account = accountService.getAccountById(id);
assertNotNull(account);
UnitOfWork currentUnitOfWork = module.currentUnitOfWork();
assertEquals(parentUnitOfWork, currentUnitOfWork);
assertTrue(currentUnitOfWork.isOpen());
// Close the parent unit of work
parentUnitOfWork.complete();
}
use of org.qi4j.index.rdf.qi64.AccountComposite in project qi4j-sdk by Qi4j.
the class IssueTest method testUnitOfWorkInitialized.
@Test
public final void testUnitOfWorkInitialized() throws Throwable {
// Bootstrap the account
String id = newQi4jAccount();
// Make sure there's no unit of work
assertFalse(module.isUnitOfWorkActive());
UnitOfWork parentUnitOfWork = module.newUnitOfWork();
AccountComposite account = accountService.getAccountById(id);
assertNotNull(account);
UnitOfWork currentUnitOfWork = module.currentUnitOfWork();
assertEquals(parentUnitOfWork, currentUnitOfWork);
assertTrue(currentUnitOfWork.isOpen());
// Close the parent unit of work
parentUnitOfWork.complete();
}
use of org.qi4j.index.rdf.qi64.AccountComposite in project qi4j-sdk by Qi4j.
the class IssueTest method testUnitOfWorkWithUnitOfWorkInitialized.
@Test
public final void testUnitOfWorkWithUnitOfWorkInitialized() throws Throwable {
// Bootstrap the account
String id = newQi4jAccount();
// Make sure there's no unit of work
assertFalse(module.isUnitOfWorkActive());
UnitOfWork parentUnitOfWork = module.newUnitOfWork();
AccountComposite account = accountService.getAccountById(id);
assertNotNull(account);
UnitOfWork currentUnitOfWork = module.currentUnitOfWork();
assertEquals(parentUnitOfWork, currentUnitOfWork);
assertTrue(currentUnitOfWork.isOpen());
// Close the parent unit of work
parentUnitOfWork.complete();
}
use of org.qi4j.index.rdf.qi64.AccountComposite in project qi4j-sdk by Qi4j.
the class IssueTest method testUnitOfWorkWithUnitOfWorkNotInitialized.
@Test
public final void testUnitOfWorkWithUnitOfWorkNotInitialized() throws Throwable {
// Bootstrap the account
String id = newQi4jAccount();
// Make sure there's no unit of work
assertFalse(module.isUnitOfWorkActive());
AccountComposite account = accountService.getAccountById(id);
assertNotNull(account);
assertFalse(module.isUnitOfWorkActive());
}
use of org.qi4j.index.rdf.qi64.AccountComposite in project qi4j-sdk by Qi4j.
the class IssueTest method testUnitOfWorkNotInitialized.
@Test
public final void testUnitOfWorkNotInitialized() throws Throwable {
// Bootstrap the account
String id = newQi4jAccount();
// Make sure there's no unit of work
assertFalse(module.isUnitOfWorkActive());
AccountComposite account = accountService.getAccountById(id);
assertNotNull(account);
assertFalse(module.isUnitOfWorkActive());
}
Aggregations