Search in sources :

Example 1 with MockitoCore

use of org.mockito.internal.MockitoCore in project mockito by mockito.

the class CallsRealMethodsTest method should_be_OK_when_calling_real_method_on_concrete_class.

@Test
public void should_be_OK_when_calling_real_method_on_concrete_class() throws Throwable {
    //given
    ArrayList<?> mock = mock(ArrayList.class);
    mock.clear();
    Invocation invocationOnClass = new MockitoCore().getLastInvocation();
    //when
    new CallsRealMethods().validateFor(invocationOnClass);
//then no exception is thrown
}
Also used : Invocation(org.mockito.invocation.Invocation) MockitoCore(org.mockito.internal.MockitoCore) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 MockitoCore (org.mockito.internal.MockitoCore)1 Invocation (org.mockito.invocation.Invocation)1