From: ivan m. <iva...@ya...> - 2001-09-30 14:54:06
|
Hello fellow MockObject users, I'd like people's opinions on the convention used by the MockObjects created by MockCreator. If you have a method: int foo(String) MockCreator creates a method: expectFoo(String,int) which sets the expectation for the method parameter and sets up the value that will be returned by that method call rather than the "MockObjects convention" setupFoo(int) for setting the return value, and: addExpectedFoo(String) [or setExpectedFoo(String) for a single value] for setting the expectation. I don't know what this convention would be like to use in practice. My fear is that I'd end up having to set expectations where I only want to setup a return value. Similarly I might want only to set expectations but not be bothered about the return values. Just to stress the point - I don't know - these are just fears and without using the mocks created by MockCreator I don't know - so please could people comment who have used the MockCreator conventions. It might be that both styles could be used together, with expectFoo(String,int) being a refactoring of setupFoo(int);addExpectedFoo(String)? Ivan __________________________________________________ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com |