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>
expectations
private 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 void
add(Expectation expectation)
private void
describe(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)
void
describeMismatch(Invocation invocation, org.hamcrest.Description description)
void
describeTo(org.hamcrest.Description description)
java.lang.Object
dispatch(Invocation invocation)
boolean
isSatisfied()
StateMachine
newStateMachine(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:
newStateMachine
in interfaceInvocationDispatcher
-
add
public void add(Expectation expectation)
- Specified by:
add
in interfaceExpectationCollector
- Specified by:
add
in interfaceInvocationDispatcher
-
describeTo
public void describeTo(org.hamcrest.Description description)
- Specified by:
describeTo
in interfaceInvocationDispatcher
- Specified by:
describeTo
in interfaceorg.hamcrest.SelfDescribing
-
describeMismatch
public void describeMismatch(Invocation invocation, org.hamcrest.Description description)
- Specified by:
describeMismatch
in 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:
isSatisfied
in interfaceInvocationDispatcher
-
dispatch
public java.lang.Object dispatch(Invocation invocation) throws java.lang.Throwable
- Specified by:
dispatch
in interfaceInvocationDispatcher
- Throws:
java.lang.Throwable
-
-