JMock-Minimal+Failing+Example

<--Back

code format="java5" @Test public void aTestThatAlwaysFails { context.checking(new Expectations {       {        }    }); testDoubleDie.roll; } code

Why does this fail? Assuming two things:
 * This test class is annotated with @RunWith(JMock.class)
 * The object testDoubleDie was created by a jMock Mockery

The any use of any method not explicitly stated in the Expectations will cause an unexpected invocation.

<--Back