public abstract class AbstractExpectation extends java.lang.Object implements Verifiable, Expectation
Modifier and Type | Field and Description |
---|---|
protected boolean |
myFailureModeIsImmediate |
protected java.lang.String |
myName |
Constructor and Description |
---|
AbstractExpectation(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
assertEquals(java.lang.String msg,
int expectedValue,
int actualValue) |
protected void |
assertEquals(java.lang.String msg,
java.lang.Object expectedValue,
java.lang.Object actualValue)
Due to junit Assert being a Singleton implemented with static methods, and java's
unfortunate implementation of class methods (e.g.
|
abstract void |
clearActual() |
boolean |
hasExpectations()
Return true if any expectations have been set on this object.
|
void |
setFailOnVerify()
If an incorrect actual value is set, defer reporting this as a failure until verify()
is called on this object.
|
protected void |
setHasExpectations() |
protected boolean |
shouldCheckImmediately() |
abstract void |
verify()
Throw an AssertionFailedException if any expectations have not been met.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setExpectNothing
protected boolean myFailureModeIsImmediate
protected java.lang.String myName
protected void assertEquals(java.lang.String msg, int expectedValue, int actualValue)
protected void assertEquals(java.lang.String msg, java.lang.Object expectedValue, java.lang.Object actualValue)
public abstract void clearActual()
public boolean hasExpectations()
Expectation
hasExpectations
in interface Expectation
public void setFailOnVerify()
Expectation
setFailOnVerify
in interface Expectation
protected void setHasExpectations()
protected boolean shouldCheckImmediately()
public abstract void verify()
Verifiable
verify
in interface Verifiable