Package org.jmock.expectation
Class Null
java.lang.Object
org.jmock.expectation.Null
A class that represents the
checks
expectations, they will compare two
null
value.
The Null
class is used when an
Expectation
is set to expect nothing.
Example usage:
public class MockX { private Expectation... anExpectation = new Expectation...(...); public MockX() { anExpectation.setExpectNothing(); } public void setAnExpectation(Object value) { anExpectation.setExpected(value); } public void setActual(Object value) { anExpectation.setActual(value); } }The act of calling
Expectation.setExpectNothing()
tells the expectation that it should expect no values to change. Since
all Null
objects are equal to themselves,
most expectations set their expected value to an instance of
Null
, and at the same time, set their actual
value to another instance of Null
.
This way, when
invalid reference
org.jmock.expectation.Verifiable#verify()
Null
objects together, which is guaranteed to succeed.- Version:
- $Id$
- Author:
- Francois Beausoleil (fbos@users.sourceforge.net)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_DESCRIPTION
The default description for allNull
objects. This String is equal to "Null
".- See Also:
-
NULL
-
-
Constructor Details
-
Method Details