1920212223242526272829
public void testCallAThenB_noExpectations() throws Exception { NiceDemo tested = createNicePartialMock(NiceDemo.class, "A", "B"); replay(tested); tested.callAThenB(); verify(tested); } }
2324252627282930313233
expectPrivate(tested, "B").times(1); expectPrivate(tested, "A").times(1); replay(tested); tested.callAThenB(); verify(tested); } @Test(expected = AssertionError.class)
3637383940414243444546
expectPrivate(tested, "B").times(1); expectPrivate(tested, "A").times(1); replay(tested); tested.callAThenB(); verify(tested); } @Test
49505152535455565758
expectPrivate(tested, "A").times(1); expectPrivate(tested, "B").times(1); replay(tested); tested.callAThenB(); verify(tested); } }