Package org.jmock.lib.concurrent
Class UnsynchronisedInvocationDispatcher
- java.lang.Object
-
- org.jmock.lib.concurrent.UnsynchronisedInvocationDispatcher
-
- All Implemented Interfaces:
org.hamcrest.SelfDescribing,ExpectationCollector,InvocationDispatcher
public class UnsynchronisedInvocationDispatcher extends java.lang.Object implements InvocationDispatcher
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<Expectation>expectationsprivate java.util.Collection<StateMachine>stateMachines
-
Constructor Summary
Constructors Constructor Description UnsynchronisedInvocationDispatcher()UnsynchronisedInvocationDispatcher(java.util.Collection<Expectation> theExpectations, java.util.Collection<StateMachine> theStateMachines)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Expectation expectation)private voiddescribe(org.hamcrest.Description description, java.lang.Iterable<? extends org.hamcrest.SelfDescribing> selfDescribingExpectations)private java.lang.Iterable<org.hamcrest.SelfDescribing>describedWith(java.lang.Iterable<Expectation> expectations, Invocation invocation)voiddescribeMismatch(Invocation invocation, org.hamcrest.Description description)voiddescribeTo(org.hamcrest.Description description)java.lang.Objectdispatch(Invocation invocation)booleanisSatisfied()StateMachinenewStateMachine(java.lang.String name)
-
-
-
Field Detail
-
expectations
private final java.util.Collection<Expectation> expectations
-
stateMachines
private final java.util.Collection<StateMachine> stateMachines
-
-
Constructor Detail
-
UnsynchronisedInvocationDispatcher
public UnsynchronisedInvocationDispatcher()
-
UnsynchronisedInvocationDispatcher
public UnsynchronisedInvocationDispatcher(java.util.Collection<Expectation> theExpectations, java.util.Collection<StateMachine> theStateMachines)
-
-
Method Detail
-
newStateMachine
public StateMachine newStateMachine(java.lang.String name)
- Specified by:
newStateMachinein interfaceInvocationDispatcher
-
add
public void add(Expectation expectation)
- Specified by:
addin interfaceExpectationCollector- Specified by:
addin interfaceInvocationDispatcher
-
describeTo
public void describeTo(org.hamcrest.Description description)
- Specified by:
describeToin interfaceInvocationDispatcher- Specified by:
describeToin interfaceorg.hamcrest.SelfDescribing
-
describeMismatch
public void describeMismatch(Invocation invocation, org.hamcrest.Description description)
- Specified by:
describeMismatchin interfaceInvocationDispatcher
-
describedWith
private java.lang.Iterable<org.hamcrest.SelfDescribing> describedWith(java.lang.Iterable<Expectation> expectations, Invocation invocation)
-
describe
private void describe(org.hamcrest.Description description, java.lang.Iterable<? extends org.hamcrest.SelfDescribing> selfDescribingExpectations)
-
isSatisfied
public boolean isSatisfied()
- Specified by:
isSatisfiedin interfaceInvocationDispatcher
-
dispatch
public java.lang.Object dispatch(Invocation invocation) throws java.lang.Throwable
- Specified by:
dispatchin interfaceInvocationDispatcher- Throws:
java.lang.Throwable
-
-