public abstract class AbstractEntityStoreWithCacheTest extends AbstractEntityStoreTest
Use an in-memory CachePool by default, implement the assembleCachePool method to override.
AbstractEntityStoreTest.TestEntity, AbstractEntityStoreTest.TestEnum, AbstractEntityStoreTest.TestValue, AbstractEntityStoreTest.TestValue2, AbstractEntityStoreTest.Tjabba, AbstractEntityStoreTest.TjabbaValuemoduleapi, application, applicationModel, qi4j, spi| Constructor and Description |
|---|
AbstractEntityStoreWithCacheTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
assemble(ModuleAssembly module)
Assemblers receive a callback to the ModuleAssembly
they are supposed to configure.
|
protected void |
assembleCachePool(ModuleAssembly module) |
void |
givenConcurrentUnitOfWorksWhenUoWCompletesThenCheckConcurrentModification() |
void |
givenEntityIsNotModifiedWhenUnitOfWorkCompletesThenDontStoreState() |
void |
givenEntityStoredLoadedChangedWhenUnitOfWorkDiscardsThenDontStoreState() |
void |
givenManyAssociationIsModifiedWhenUnitOfWorkCompletesThenStoreState() |
void |
givenPropertyIsModifiedWhenUnitOfWorkCompletesThenStoreState() |
void |
whenNewEntityThenCanFindEntityAndCorrectValues() |
void |
whenRemovedEntityThenCannotFindEntity() |
createEntity, init, tearDowndefineApplication, setUpassemblyException, initApplication, newApplication, newApplicationInstancepublic void assemble(ModuleAssembly module) throws AssemblyException
Assembler
An Assembler may create new Modules by calling
ModuleAssembly.layer() and
then LayerAssembly.module(String) (String)}.
This allows an Assembler to bootstrap an entire Layer with
more Modules.
assemble in interface Assemblerassemble in class AbstractEntityStoreTestmodule - the Module to assembleAssemblyException - thrown if the assembler tries to do something illegalprotected void assembleCachePool(ModuleAssembly module) throws AssemblyException
AssemblyExceptionpublic void whenNewEntityThenCanFindEntityAndCorrectValues()
throws Exception
whenNewEntityThenCanFindEntityAndCorrectValues in class AbstractEntityStoreTestExceptionpublic void whenRemovedEntityThenCannotFindEntity()
throws Exception
whenRemovedEntityThenCannotFindEntity in class AbstractEntityStoreTestExceptionpublic void givenEntityIsNotModifiedWhenUnitOfWorkCompletesThenDontStoreState()
throws UnitOfWorkCompletionException
givenEntityIsNotModifiedWhenUnitOfWorkCompletesThenDontStoreState in class AbstractEntityStoreTestUnitOfWorkCompletionExceptionpublic void givenPropertyIsModifiedWhenUnitOfWorkCompletesThenStoreState()
throws UnitOfWorkCompletionException
givenPropertyIsModifiedWhenUnitOfWorkCompletesThenStoreState in class AbstractEntityStoreTestUnitOfWorkCompletionExceptionpublic void givenManyAssociationIsModifiedWhenUnitOfWorkCompletesThenStoreState()
throws UnitOfWorkCompletionException
givenManyAssociationIsModifiedWhenUnitOfWorkCompletesThenStoreState in class AbstractEntityStoreTestUnitOfWorkCompletionExceptionpublic void givenConcurrentUnitOfWorksWhenUoWCompletesThenCheckConcurrentModification()
throws UnitOfWorkCompletionException
public void givenEntityStoredLoadedChangedWhenUnitOfWorkDiscardsThenDontStoreState()
throws UnitOfWorkCompletionException