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.TjabbaValue
module, objectFactory, queryBuilderFactory, serviceFinder, transientBuilderFactory, unitOfWorkFactory, valueBuilderFactory
api, application, applicationModel, notYetImplementedRule, polygene, 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, entityStatesSPI, givenAssociationsModifiedWhenUnitOfWorkCompletesThenStoreState, tearDown
defineApplication, setUp
assemblyException, initApplication, newApplicationInstance, newApplicationModel
public void assemble(ModuleAssembly module)
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 Assembler
assemble
in class AbstractEntityStoreTest
module
- the Module to assembleprotected void assembleCachePool(ModuleAssembly module) throws AssemblyException
AssemblyException
public void whenNewEntityThenCanFindEntityAndCorrectValues() throws Exception
whenNewEntityThenCanFindEntityAndCorrectValues
in class AbstractEntityStoreTest
Exception
public void whenRemovedEntityThenCannotFindEntity() throws Exception
whenRemovedEntityThenCannotFindEntity
in class AbstractEntityStoreTest
Exception
public void givenEntityIsNotModifiedWhenUnitOfWorkCompletesThenDontStoreState() throws UnitOfWorkCompletionException
givenEntityIsNotModifiedWhenUnitOfWorkCompletesThenDontStoreState
in class AbstractEntityStoreTest
UnitOfWorkCompletionException
public void givenPropertyIsModifiedWhenUnitOfWorkCompletesThenStoreState() throws UnitOfWorkCompletionException
givenPropertyIsModifiedWhenUnitOfWorkCompletesThenStoreState
in class AbstractEntityStoreTest
UnitOfWorkCompletionException
public void givenManyAssociationIsModifiedWhenUnitOfWorkCompletesThenStoreState() throws UnitOfWorkCompletionException
UnitOfWorkCompletionException
public void givenConcurrentUnitOfWorksWhenUoWCompletesThenCheckConcurrentModification() throws UnitOfWorkCompletionException
public void givenEntityStoredLoadedChangedWhenUnitOfWorkDiscardsThenDontStoreState() throws UnitOfWorkCompletionException