« Return to Thread: How would you test this?

Re: How would you test this?

by Steve Freeman-2 :: Rate this Message:

Reply to Author | View in Thread

On 22 May 2009, at 11:47, Louis Rose wrote:
> Hi Steve,
>
> Thanks for the insightful question - I can use it in other  
> situations to determine whether to use a mock.

that's one of our core design questions.

> I'm still a little confused about whether jMock can be used to stub  
> out methods on the object under test? I guess not. Does wanting to  
> stub out a method on the object under test indicate a problem with  
> the design?

We think so, although plenty of others disagree. We prefer to think in  
terms of small objects composed together, rather than taking slices  
through larger objects.

> Many thanks for the help.


Always happy to help. In the meantime, we have a book in progress at

http://www.mockobjects.com/book

Read and comment via the list :)

S.

Steve Freeman
Winner of the Agile Alliance Gordon Pask award 2006

http://www.m3p.co.uk

M3P Limited.
Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
Company registered in England & Wales. Number 03689627



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

    http://xircles.codehaus.org/manage_email


 « Return to Thread: How would you test this?