/external/mockito/src/test/java/org/mockitousage/verification/ |
D | VerificationInOrderWithCallsTest.java | 22 @Mock private IMethods mockOne; field in VerificationInOrderWithCallsTest 30 mockOne.oneArg( 1 ); in shouldFailWhenMethodNotCalled() 31 InOrder verifier = inOrder( mockOne ); in shouldFailWhenMethodNotCalled() 32 verifier.verify( mockOne, calls(1)).oneArg( 1 ); in shouldFailWhenMethodNotCalled() 40 verifier.verify( mockOne, calls(1)).oneArg( 2 ); in shouldFailWhenMethodNotCalled() 48 mockOne.oneArg( 1 ); in shouldFailWhenMethodCalledTooFewTimes() 49 mockOne.oneArg( 2 ); in shouldFailWhenMethodCalledTooFewTimes() 51 InOrder verifier = inOrder( mockOne ); in shouldFailWhenMethodCalledTooFewTimes() 52 verifier.verify( mockOne, calls(1)).oneArg( 1 ); in shouldFailWhenMethodCalledTooFewTimes() 61 verifier.verify( mockOne, calls(2)).oneArg( 2 ); in shouldFailWhenMethodCalledTooFewTimes() [all …]
|
D | VerificationInOrderTest.java | 22 private IMethods mockOne; field in VerificationInOrderTest 29 mockOne = mock(IMethods.class); in setUp() 33 inOrder = inOrder(mockOne, mockTwo, mockThree); in setUp() 38 mockOne = mock(IMethods.class); in shouldVerifySingleMockInOrderAndNotInOrder() 39 inOrder = inOrder(mockOne); in shouldVerifySingleMockInOrderAndNotInOrder() 41 mockOne.simpleMethod(1); in shouldVerifySingleMockInOrderAndNotInOrder() 42 mockOne.simpleMethod(2); in shouldVerifySingleMockInOrderAndNotInOrder() 44 verify(mockOne).simpleMethod(2); in shouldVerifySingleMockInOrderAndNotInOrder() 45 verify(mockOne).simpleMethod(1); in shouldVerifySingleMockInOrderAndNotInOrder() 47 inOrder.verify(mockOne).simpleMethod(2); in shouldVerifySingleMockInOrderAndNotInOrder() [all …]
|
D | BasicVerificationInOrderTest.java | 24 private IMethods mockOne; field in BasicVerificationInOrderTest 31 mockOne = mock(IMethods.class); in setUp() 35 inOrder = inOrder(mockOne, mockTwo, mockThree); in setUp() 37 mockOne.simpleMethod(1); in setUp() 42 mockOne.simpleMethod(4); in setUp() 47 inOrder.verify(mockOne).simpleMethod(1); in shouldVerifyInOrder() 51 inOrder.verify(mockOne).simpleMethod(4); in shouldVerifyInOrder() 52 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldVerifyInOrder() 57 inOrder.verify(mockOne, atLeastOnce()).simpleMethod(1); in shouldVerifyInOrderUsingAtLeastOnce() 61 inOrder.verify(mockOne, atLeastOnce()).simpleMethod(4); in shouldVerifyInOrderUsingAtLeastOnce() [all …]
|
D | VerificationInOrderMixedWithOrdiraryVerificationTest.java | 22 private IMethods mockOne; field in VerificationInOrderMixedWithOrdiraryVerificationTest 29 mockOne = mock(IMethods.class); in setUp() 33 mockOne.simpleMethod(1); in setUp() 34 mockOne.simpleMethod(1); in setUp() 39 inOrder = inOrder(mockOne, mockThree); in setUp() 44 inOrder.verify(mockOne, atLeastOnce()).simpleMethod(1); in shouldMixVerificationInOrderAndOrdinaryVerification() 49 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldMixVerificationInOrderAndOrdinaryVerification() 54 inOrder.verify(mockOne, atLeastOnce()).simpleMethod(1); in shouldAllowOrdinarilyVerifyingMockPassedToInOrderObject() 60 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldAllowOrdinarilyVerifyingMockPassedToInOrderObject() 65 verify(mockOne, atLeastOnce()).simpleMethod(1); in shouldAllowRedundantVerifications() [all …]
|
D | SelectedMocksInOrderVerificationTest.java | 21 private IMethods mockOne; field in SelectedMocksInOrderVerificationTest 27 mockOne = mock(IMethods.class); in setUp() 31 mockOne.simpleMethod(1); in setUp() 36 mockOne.simpleMethod(4); in setUp() 41 InOrder inOrder = inOrder(mockOne, mockTwo, mockThree); in shouldVerifyAllInvocationsInOrder() 42 inOrder.verify(mockOne).simpleMethod(1); in shouldVerifyAllInvocationsInOrder() 46 inOrder.verify(mockOne).simpleMethod(4); in shouldVerifyAllInvocationsInOrder() 47 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldVerifyAllInvocationsInOrder() 62 InOrder inOrder = inOrder(mockOne, mockThree); in shouldVerifyInOrderMockOneAndThree() 64 inOrder.verify(mockOne).simpleMethod(1); in shouldVerifyInOrderMockOneAndThree() [all …]
|
D | RelaxedVerificationInOrderTest.java | 26 private IMethods mockOne; field in RelaxedVerificationInOrderTest 33 mockOne = mock(IMethods.class); in setUp() 37 inOrder = inOrder(mockOne, mockTwo, mockThree); in setUp() 39 mockOne.simpleMethod(1); in setUp() 44 mockOne.simpleMethod(4); in setUp() 49 inOrder.verify(mockOne).simpleMethod(1); in shouldVerifyInOrderAllInvocations() 53 inOrder.verify(mockOne).simpleMethod(4); in shouldVerifyInOrderAllInvocations() 54 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldVerifyInOrderAllInvocations() 68 inOrder.verify(mockOne).simpleMethod(4); in shouldAllowFirstChunkBeforeLastInvocation() 79 inOrder.verify(mockOne).simpleMethod(4); in shouldAllowAllChunksBeforeLastInvocation() [all …]
|
/external/mockito/src/test/java/org/mockito/internal/ |
D | AllInvocationsFinderTest.java | 29 private IMethods mockOne; field in AllInvocationsFinderTest 33 mockOne = mock(IMethods.class); in setup() 40 assertTrue(find(asList(mockOne, mockTwo)).isEmpty()); in no_interactions() 41 assertTrue(findStubbings(asList(mockOne, mockTwo)).isEmpty()); in no_interactions() 47 mockOne.simpleMethod(100); in provides_invocations_in_order() 49 mockOne.simpleMethod(300); in provides_invocations_in_order() 52 List<Invocation> invocations = find(asList(mockOne, mockTwo)); in provides_invocations_in_order() 64 mockOne.simpleMethod(100); in deduplicates_interactions_from_the_same_mock() 67 List<Invocation> invocations = find(asList(mockOne, mockOne, mockOne)); in deduplicates_interactions_from_the_same_mock() 76 mockOne.simpleMethod(50); //ignored, not a stubbing in provides_stubbings_in_order() [all …]
|
/external/mockito/src/test/java/org/mockito/internal/creation/bytebuddy/ |
D | AbstractByteBuddyMockMakerTest.java | 71 SomeClass mockOne = mockMaker.createMock(settingsFor(SomeClass.class), dummyHandler()); in should_mocks_have_different_interceptors() local 74 MockHandler handlerOne = mockMaker.getHandler(mockOne); in should_mocks_have_different_interceptors()
|