« Return to Thread: Changing expectations

Re: Changing expectations

by Nat Pryce :: Rate this Message:

Reply to Author | View in Thread

On 26/11/2007, Harald Ueland <harald@...> wrote:
> Is there a way to change return values for expectations after they are set?

No.

> I want to do this for some tests where 99 % of the test methods use predefined
> expectations set up from setUp(), but a few needs other return values.
>
> How can this be done without calling a setup method in all the tests?

It cannot.  That's because pulling the common setup into a clearly
named utility method makes tests *much* easier to understand.

--Nat

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

 « Return to Thread: Changing expectations