|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.jmock.core.VerifyingTestCase
org.jmock.core.MockObjectSupportTestCase
org.jmock.MockObjectTestCase
org.jmock.cglib.MockObjectTestCase
net.sourceforge.hiveutils.test.HivemindUnitTestCase
public class HivemindUnitTestCase
Utility class that test cases can inherit in order to have better support (additional "syntactic sugar") for jMock usage.
Field Summary |
---|
Fields inherited from class org.jmock.core.MockObjectSupportTestCase |
---|
ANYTHING, NOT_NULL, NULL |
Constructor Summary | |
---|---|
HivemindUnitTestCase()
|
Method Summary | |
---|---|
protected org.jmock.core.Stub |
defaultReturn()
Returns a Stub that produces a default return value. |
protected java.lang.Object |
getArgument(java.lang.String name)
Return the value of an argument provided to a Mock object's
method and saved thanks to a SaveConstraint . |
protected org.jmock.core.Constraint |
isnull()
Syntactic sugar to create an IsNull Constraint. |
void |
runBare()
Overridden to reset the list of arguments values retained by the save methods. |
protected org.jmock.core.Constraint |
save(java.lang.String name)
Creates a Constraint that is used in the description of the
expected argument to mocked method, and that needs to be saved under a
name for later use in the same test case. |
protected org.jmock.core.Constraint |
save(java.lang.String name,
org.jmock.core.Constraint inner)
Creates a Constraint that is used in the description of the
expected argument to mocked method, and that needs to be saved under a
name for later use in the same test case. |
Methods inherited from class org.jmock.cglib.MockObjectTestCase |
---|
newCoreMock |
Methods inherited from class org.jmock.MockObjectTestCase |
---|
atLeastOnce, defaultMockNameForType, mock, mock, never, once, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, throwException |
Methods inherited from class org.jmock.core.MockObjectSupportTestCase |
---|
and, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, isA, newDummy, newDummy, newDummy, not, or, same, stringContains |
Methods inherited from class org.jmock.core.VerifyingTestCase |
---|
registerToVerify, unregisterToVerify, verify |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HivemindUnitTestCase()
Method Detail |
---|
public void runBare() throws java.lang.Throwable
save
methods.
runBare
in class org.jmock.core.VerifyingTestCase
java.lang.Throwable
protected java.lang.Object getArgument(java.lang.String name)
Mock
object's
method and saved thanks to a SaveConstraint
.
name
- name under which the argument was saved
null
if there
was no argument saved under this nameprotected org.jmock.core.Constraint save(java.lang.String name)
Constraint
that is used in the description of the
expected argument to mocked method, and that needs to be saved under a
name for later use in the same test case.
name
- name under which the argument's value will be saved
with
methodprotected org.jmock.core.Constraint save(java.lang.String name, org.jmock.core.Constraint inner)
Constraint
that is used in the description of the
expected argument to mocked method, and that needs to be saved under a
name for later use in the same test case.
name
- name under which the argument's value will be savedinner
- a real constraint that will be checked by jMock on the
argument's value
with
methodprotected org.jmock.core.Constraint isnull()
IsNull
Constraint.
protected org.jmock.core.Stub defaultReturn()
Stub
that produces a default return value. This
is simply syntactic sugar around new DefaultResultStub()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |