use of org.qi4j.api.unitofwork.UnitOfWork in project qi4j-sdk by Qi4j.
the class ValueVisibilityTest method givenFromEntityWhenAccessingAboveApplicationVisibleExpectException.
@Test(expected = NoSuchValueException.class)
public void givenFromEntityWhenAccessingAboveApplicationVisibleExpectException() {
UnitOfWork unitOfWork = module.newUnitOfWork();
try {
FromEntity entity = unitOfWork.newEntity(FromEntity.class, "123");
entity.aboveApplicationVisible();
} finally {
if (unitOfWork.isOpen()) {
unitOfWork.discard();
}
}
}
use of org.qi4j.api.unitofwork.UnitOfWork in project qi4j-sdk by Qi4j.
the class ValueVisibilityTest method givenFromEntityWhenAccessingAboveLayerVisibleExpectException.
@Test(expected = NoSuchValueException.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 ValueVisibilityTest method givenFromEntityWhenAccessingBesideLayerVisibleExpectSuccess.
@Test
public void givenFromEntityWhenAccessingBesideLayerVisibleExpectSuccess() {
UnitOfWork unitOfWork = module.newUnitOfWork();
try {
FromEntity entity = unitOfWork.newEntity(FromEntity.class, "123");
entity.besideLayerVisible();
} finally {
if (unitOfWork.isOpen()) {
unitOfWork.discard();
}
}
}
use of org.qi4j.api.unitofwork.UnitOfWork in project qi4j-sdk by Qi4j.
the class ValueVisibilityTest method givenFromEntityWhenAccessingBesideApplicationVisibleExpectSuccess.
@Test
public void givenFromEntityWhenAccessingBesideApplicationVisibleExpectSuccess() {
UnitOfWork unitOfWork = module.newUnitOfWork();
try {
FromEntity entity = unitOfWork.newEntity(FromEntity.class, "123");
entity.besideApplicationVisible();
} finally {
if (unitOfWork.isOpen()) {
unitOfWork.discard();
}
}
}
use of org.qi4j.api.unitofwork.UnitOfWork in project qi4j-sdk by Qi4j.
the class ValueVisibilityTest method givenFromEntityWhenAccessingBelowModuleVisibleExpectException.
@Test(expected = NoSuchValueException.class)
public void givenFromEntityWhenAccessingBelowModuleVisibleExpectException() {
UnitOfWork unitOfWork = module.newUnitOfWork();
try {
FromEntity entity = unitOfWork.newEntity(FromEntity.class, "123");
entity.belowModuleVisible();
} finally {
if (unitOfWork.isOpen()) {
unitOfWork.discard();
}
}
}
Aggregations