Package org.spockframework.mock.runtime
Class MockInteraction
- java.lang.Object
-
- org.spockframework.mock.runtime.MockInteraction
-
- All Implemented Interfaces:
IMockInteraction
public class MockInteraction extends java.lang.Object implements IMockInteraction
An anticipated interaction between the SUT and one or more mock objects.- Author:
- Peter Niederwieser
-
-
Constructor Summary
Constructors Constructor Description MockInteraction(int line, int column, java.lang.String text, int minCount, int maxCount, java.util.List<IInvocationConstraint> constraints, IResponseGenerator responseGenerator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
accept(IMockInvocation invocation)
int
computeSimilarityScore(IMockInvocation invocation)
java.util.List<IMockInvocation>
getAcceptedInvocations()
int
getColumn()
int
getLine()
java.lang.String
getText()
boolean
isExhausted()
boolean
isRequired()
boolean
isSatisfied()
boolean
matches(IMockInvocation invocation)
java.lang.String
toString()
-
-
-
Constructor Detail
-
MockInteraction
public MockInteraction(int line, int column, java.lang.String text, int minCount, int maxCount, java.util.List<IInvocationConstraint> constraints, IResponseGenerator responseGenerator)
-
-
Method Detail
-
matches
public boolean matches(IMockInvocation invocation)
- Specified by:
matches
in interfaceIMockInteraction
-
accept
public java.lang.Object accept(IMockInvocation invocation)
- Specified by:
accept
in interfaceIMockInteraction
-
getAcceptedInvocations
public java.util.List<IMockInvocation> getAcceptedInvocations()
- Specified by:
getAcceptedInvocations
in interfaceIMockInteraction
-
computeSimilarityScore
public int computeSimilarityScore(IMockInvocation invocation)
- Specified by:
computeSimilarityScore
in interfaceIMockInteraction
-
isSatisfied
public boolean isSatisfied()
- Specified by:
isSatisfied
in interfaceIMockInteraction
-
isExhausted
public boolean isExhausted()
- Specified by:
isExhausted
in interfaceIMockInteraction
-
isRequired
public boolean isRequired()
- Specified by:
isRequired
in interfaceIMockInteraction
-
getLine
public int getLine()
- Specified by:
getLine
in interfaceIMockInteraction
-
getColumn
public int getColumn()
- Specified by:
getColumn
in interfaceIMockInteraction
-
getText
public java.lang.String getText()
- Specified by:
getText
in interfaceIMockInteraction
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-