Author Login
Post Reply
Hi,
could someone explain the following behaviour using JMock 2.4.0 and JUnit 4.4:
interface Dummy {
}
public class EqualsTest {
@Test
public void testEquals() {
Mockery context = new JUnit4Mockery();
final Dummy dummy = context.mock(Dummy.class);
final Object o = new Object();
context.checking(new Expectations() {{
one(dummy).equals(o); will(returnValue(true));
}});
assertTrue(dummy.equals(o));
}
}
The test fails. It seems that the call to equals is not handled by the proxy but
by java.lang.Object. I only found an old issue #55 regarding JMock1 which was
fixed long time ago.
Any comments?
best regards,
konrad
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email