use of org.qi4j.api.unitofwork.UnitOfWork in project qi4j-sdk by Qi4j.
the class ServiceVisibilityTest method givenFromEntityWhenAccessingAboveLayerVisibleExpectException.
@Test(expected = NoSuchServiceException.class)
public void givenFromEntityWhenAccessingAboveLayerVisibleExpectException() {
UnitOfWork unitOfWork = module.newUnitOfWork();
try {
FromEntity entity = unitOfWork.newEntity(FromEntity.class, "123");
entity.aboveLayerVisible();
} finally {
if (unitOfWork.isOpen()) {
unitOfWork.discard();
}
}
}
use of org.qi4j.api.unitofwork.UnitOfWork in project qi4j-sdk by Qi4j.
the class ServiceVisibilityTest method givenFromEntityWhenAccessingAboveModuleVisibleExpectException.
@Test(expected = NoSuchServiceException.class)
public void givenFromEntityWhenAccessingAboveModuleVisibleExpectException() {
UnitOfWork unitOfWork = module.newUnitOfWork();
try {
FromEntity entity = unitOfWork.newEntity(FromEntity.class, "123");
entity.aboveModuleVisible();
} finally {
if (unitOfWork.isOpen()) {
unitOfWork.discard();
}
}
}
use of org.qi4j.api.unitofwork.UnitOfWork in project qi4j-sdk by Qi4j.
the class ServiceVisibilityTest method givenFromEntityWhenAccessingModuleLayerVisibleExpectSuccess.
@Test
public void givenFromEntityWhenAccessingModuleLayerVisibleExpectSuccess() {
UnitOfWork unitOfWork = module.newUnitOfWork();
try {
FromEntity entity = unitOfWork.newEntity(FromEntity.class, "123");
entity.moduleLayerVisible();
} finally {
if (unitOfWork.isOpen()) {
unitOfWork.discard();
}
}
}
use of org.qi4j.api.unitofwork.UnitOfWork in project qi4j-sdk by Qi4j.
the class ServiceVisibilityTest method givenFromEntityWhenAccessingModuleModuleVisibleExpectSuccess.
@Test
public void givenFromEntityWhenAccessingModuleModuleVisibleExpectSuccess() {
UnitOfWork unitOfWork = module.newUnitOfWork();
try {
FromEntity entity = unitOfWork.newEntity(FromEntity.class, "123");
entity.moduleModuleVisible();
} finally {
if (unitOfWork.isOpen()) {
unitOfWork.discard();
}
}
}
use of org.qi4j.api.unitofwork.UnitOfWork in project qi4j-sdk by Qi4j.
the class ObjectVisibilityTest method givenFromEntityWhenAccessingModuleApplicationVisibleExpectSuccess.
@Test
public void givenFromEntityWhenAccessingModuleApplicationVisibleExpectSuccess() {
UnitOfWork unitOfWork = module.newUnitOfWork();
try {
FromEntity entity = unitOfWork.newEntity(FromEntity.class, "123");
entity.moduleApplicationVisible();
} finally {
if (unitOfWork.isOpen()) {
unitOfWork.discard();
}
}
}
Aggregations