java - Is it possible to create a mock object that implements multiple interfaces with EasyMock? -
Is it possible to create a duplicate object that implements several interfaces with eZMock?
For example, interface Foo
and the interface shutdown
?
While creating a duplicate object, you can provide multiple interfaces in Rhino Mox, but the createMock ()
of EasyMock takes only one type.
Is it possible to achieve this with EasyMock, without using the fallback to create an instantaneous interface, which closes both Foo
and
, and then the joke of that?
Physical mock does not support it so that you're stuck with the temporary interface's fallback.
In a different form, I smell a bit of a code wiff - a method should actually be treated with 2 different things as an object, Foo
and this case In the shutdown
interface?
It means to me that the method is doing a lot of operations and when I suspect that one of those tasks is "to turn off" is to be closing By structuring the code in this way, try the same "code" to 'open' and 'closed' ... finally the block and the IMHO code make it more readable. Not to mention more general and allows you to pass an object that only executes , then what? Does it not understand much? Is the calling code 'off' required to decide?
Foo
.
Comments
Post a Comment