| |
|
| java.lang.Object org.ddsteps.mock.MockUtilsBean
MockUtilsBean | class MockUtilsBean (Code) | | Implements MockUtils.
author: ct26 |
MockUtilsBean | public MockUtilsBean()(Code) | | No-args.
|
createMethodFocusedStrictClassControl | public MockControl createMethodFocusedStrictClassControl(Class clazz, String methodName) throws NoSuchMethodException(Code) | | Creates mock where ALL METHODS (implemented or not) are mocked EXCEPT for
the method whose name you supply. This is the kind of mock you use to
test just one method in your class at a time.
If there is more than one method with the same name, the first one found
gets mocked.
TODO: Overload method with one that takes params to exacly specify the
method to leave unmocked.
Parameters: clazz - The class Parameters: methodName - The method name. MockControl, never null. throws: NoSuchMethodException - Thrown if the method cannot be found. |
createMockClassControl | protected MockControl createMockClassControl(Set methodsToMock, Class clazz)(Code) | | Parameters: methodsToMock - Parameters: clazz - The MockControl |
findMockControlsInFields | protected Collection findMockControlsInFields(Object testCase)(Code) | | Get list of not-null MockControl fields. Makes the fields accessible by
force.
Parameters: testCase - The object to look in. (@link Collection) of (@link MockControl), never null. |
replay | public int replay(Object testCase)(Code) | | Call replay() on all MockControl fields. Getters are NOT used! Looks for
fields in superclasses too.
Parameters: testCase - The testcase to search. The number of mock controls processed. See Also: MockUtils.replay(Object) |
verify | public int verify(Object testCase)(Code) | | Call verify() on all MockControl fields. Getters are NOT used! Looks for
fields in superclasses too.s
Parameters: testCase - The testcase to search The number of MockControls processed. See Also: MockUtils.verify(Object) |
|
|
|