org.qi4j.test.entity
Class AbstractEntityStoreTest

java.lang.Object
  extended by org.qi4j.test.AbstractQi4jTest
      extended by org.qi4j.test.entity.AbstractEntityStoreTest
All Implemented Interfaces:
Assembler

public abstract class AbstractEntityStoreTest
extends AbstractQi4jTest

Abstract satisfiedBy with tests for the EntityStore interface.


Nested Class Summary
static interface AbstractEntityStoreTest.TestEntity
           
static class AbstractEntityStoreTest.TestEnum
           
static interface AbstractEntityStoreTest.TestValue
           
static interface AbstractEntityStoreTest.TestValue2
           
static interface AbstractEntityStoreTest.Tjabba
           
static interface AbstractEntityStoreTest.TjabbaValue
           
 
Field Summary
 
Fields inherited from class org.qi4j.test.AbstractQi4jTest
api, application, applicationModel, moduleInstance, objectBuilderFactory, qi4j, queryBuilderFactory, serviceLocator, spi, transientBuilderFactory, unitOfWorkFactory, valueBuilderFactory
 
Constructor Summary
AbstractEntityStoreTest()
           
 
Method Summary
 void assemble(ModuleAssembly module)
          Assemblers receive a callback to the ModuleAssembly they are supposed to configure.
protected  AbstractEntityStoreTest.TestEntity createEntity(UnitOfWork unitOfWork)
           
 void givenConcurrentUnitOfWorksWhenUoWCompletesThenCheckConcurrentModification()
           
 void givenEntityIsNotModifiedWhenUnitOfWorkCompletesThenDontStoreState()
           
 void givenManyAssociationIsModifiedWhenUnitOfWorkCompletesThenStoreState()
           
 void givenPropertyIsModifiedWhenUnitOfWorkCompletesThenStoreState()
           
 void init()
           
 void tearDown()
           
 void whenNewEntityThenCanFindEntityAndCorrectValues()
           
 void whenRemovedEntityThenCannotFindEntity()
           
 
Methods inherited from class org.qi4j.test.AbstractQi4jTest
assemblyException, getLog, initApplication, newApplication, setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEntityStoreTest

public AbstractEntityStoreTest()
Method Detail

assemble

public void assemble(ModuleAssembly module)
              throws AssemblyException
Description copied from interface: Assembler
Assemblers receive a callback to the ModuleAssembly they are supposed to configure. They can use this to register objects, composites, services etc. and the additional metadata that may exist for these artifacts.

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.

Parameters:
module - the Module to assemble
Throws:
AssemblyException - thrown if the assembler tries to do something illegal

init

public void init()

tearDown

public void tearDown()
              throws Exception
Overrides:
tearDown in class AbstractQi4jTest
Throws:
Exception

createEntity

protected AbstractEntityStoreTest.TestEntity createEntity(UnitOfWork unitOfWork)
                                                   throws UnitOfWorkCompletionException
Throws:
UnitOfWorkCompletionException

whenNewEntityThenCanFindEntityAndCorrectValues

public void whenNewEntityThenCanFindEntityAndCorrectValues()
                                                    throws Exception
Throws:
Exception

whenRemovedEntityThenCannotFindEntity

public void whenRemovedEntityThenCannotFindEntity()
                                           throws Exception
Throws:
Exception

givenEntityIsNotModifiedWhenUnitOfWorkCompletesThenDontStoreState

public void givenEntityIsNotModifiedWhenUnitOfWorkCompletesThenDontStoreState()
                                                                       throws UnitOfWorkCompletionException
Throws:
UnitOfWorkCompletionException

givenPropertyIsModifiedWhenUnitOfWorkCompletesThenStoreState

public void givenPropertyIsModifiedWhenUnitOfWorkCompletesThenStoreState()
                                                                  throws UnitOfWorkCompletionException
Throws:
UnitOfWorkCompletionException

givenManyAssociationIsModifiedWhenUnitOfWorkCompletesThenStoreState

public void givenManyAssociationIsModifiedWhenUnitOfWorkCompletesThenStoreState()
                                                                         throws UnitOfWorkCompletionException
Throws:
UnitOfWorkCompletionException

givenConcurrentUnitOfWorksWhenUoWCompletesThenCheckConcurrentModification

public void givenConcurrentUnitOfWorksWhenUoWCompletesThenCheckConcurrentModification()
                                                                               throws UnitOfWorkCompletionException
Throws:
UnitOfWorkCompletionException