use of org.mockito.internal.verification.api.VerificationDataInOrderImpl in project mockito by mockito.
the class NoMoreInteractionsTest method noMoreInteractionsInOrderExceptionMessageShouldDescribeMock.
@Test
public void noMoreInteractionsInOrderExceptionMessageShouldDescribeMock() {
//given
NoMoreInteractions n = new NoMoreInteractions();
IMethods mock = mock(IMethods.class, "a mock");
Invocation i = new InvocationBuilder().mock(mock).toInvocation();
try {
//when
n.verifyInOrder(new VerificationDataInOrderImpl(context, asList(i), null));
//then
fail();
} catch (VerificationInOrderFailure e) {
Assertions.assertThat(e.toString()).contains(mock.toString());
}
}
use of org.mockito.internal.verification.api.VerificationDataInOrderImpl in project mockito by mockito.
the class NoMoreInteractionsTest method shouldVerifyInOrder.
@Test
public void shouldVerifyInOrder() {
//given
NoMoreInteractions n = new NoMoreInteractions();
Invocation i = new InvocationBuilder().toInvocation();
assertFalse(context.isVerified(i));
try {
//when
n.verifyInOrder(new VerificationDataInOrderImpl(context, asList(i), null));
//then
fail();
} catch (VerificationInOrderFailure e) {
}
}
Aggregations