Hello. I'm new to using mock objects, so, maybe I'm using something
wrong, but I'd like to suggest adding the following to
com.mockobjects.ExpectationValue:
/**
* Provide access to the expected value for this expectation so
that
* mock objects can return that value to clients.
*/
public Object getExpected()
{
return myExpectedValue;
}
This would allow a mock to use the expected value to implement its
interface. For example, I have an object that's supposed to have some
properties set on it at one point and then retrieved later in the same
workflow. In order to use expectation value, the way it's currently
written, I find myself having two variables: the expectation and a value
(same thing that's stored in the expectation.
Comments/Suggestions? Am I doing something wrong?
Sincerely,
Dan Cramer
|