Package poussecafe.test
Class PousseCafeTest
- java.lang.Object
-
- poussecafe.test.PousseCafeTest
-
- Direct Known Subclasses:
IdempotencyTest
public abstract class PousseCafeTest extends Object
-
-
Constructor Summary
Constructors Constructor Description PousseCafeTest()
-
Method Summary
Modifier and Type Method Description voidconfigureContext()voidemitDomainEvent(poussecafe.domain.DomainEvent event)voidemitDomainEvents(List<? extends poussecafe.domain.DomainEvent> event)<T extends poussecafe.domain.AggregateRoot<K,D>,K,D extends poussecafe.domain.EntityAttributes<K>>
Tfind(Class<T> entityClass, K id)Deprecated, for removal: This API element is subject to removal in a future version.use getOptional instead<T extends poussecafe.domain.AggregateRoot<K,D>,K,D extends poussecafe.domain.EntityAttributes<K>>
Optional<T>getOptional(Class<T> entityClass, K id)voidgiven(String resourceName)voidloadDataFile(String path)<C extends poussecafe.runtime.Command>
CnewCommand(Class<C> commandClass)<D extends poussecafe.domain.DomainEvent>
DnewDomainEvent(Class<D> eventClass)<E> EnewEntity(Class<E> entityClass)PousseCafeTestObjectMapperobjectMapper()poussecafe.environment.MessageListenersPoolSplitStrategyreplicationStrategy(int numberOfPools)protected poussecafe.runtime.Runtime.BuilderruntimeBuilder()voidsubmitCommand(poussecafe.runtime.Command command)voidtearDownInternalMessaging()poussecafe.runtime.RuntimetestRuntime()protected voidwaitUntilAllMessageQueuesEmpty()voidwhen(poussecafe.domain.DomainEvent event)voidwhen(poussecafe.runtime.Command command)protected TestRuntimeWrapperwrapper()
-
-
-
Method Detail
-
configureContext
public void configureContext()
-
runtimeBuilder
protected poussecafe.runtime.Runtime.Builder runtimeBuilder()
-
replicationStrategy
public poussecafe.environment.MessageListenersPoolSplitStrategy replicationStrategy(int numberOfPools)
-
testRuntime
public poussecafe.runtime.Runtime testRuntime()
-
find
@Deprecated(since="0.8.0", forRemoval=true) public <T extends poussecafe.domain.AggregateRoot<K,D>,K,D extends poussecafe.domain.EntityAttributes<K>> T find(Class<T> entityClass, K id)
Deprecated, for removal: This API element is subject to removal in a future version.use getOptional instead
-
getOptional
public <T extends poussecafe.domain.AggregateRoot<K,D>,K,D extends poussecafe.domain.EntityAttributes<K>> Optional<T> getOptional(Class<T> entityClass, K id)
-
waitUntilAllMessageQueuesEmpty
protected void waitUntilAllMessageQueuesEmpty()
-
newDomainEvent
public <D extends poussecafe.domain.DomainEvent> D newDomainEvent(Class<D> eventClass)
-
emitDomainEvent
public void emitDomainEvent(poussecafe.domain.DomainEvent event)
-
emitDomainEvents
public void emitDomainEvents(List<? extends poussecafe.domain.DomainEvent> event)
-
loadDataFile
public void loadDataFile(String path)
-
wrapper
protected TestRuntimeWrapper wrapper()
-
tearDownInternalMessaging
public void tearDownInternalMessaging()
-
newCommand
public <C extends poussecafe.runtime.Command> C newCommand(Class<C> commandClass)
-
submitCommand
public void submitCommand(poussecafe.runtime.Command command)
-
objectMapper
public PousseCafeTestObjectMapper objectMapper()
-
newEntity
public <E> E newEntity(Class<E> entityClass)
-
given
public void given(String resourceName)
-
when
public void when(poussecafe.runtime.Command command)
-
when
public void when(poussecafe.domain.DomainEvent event)
-
-