/external/mockito/src/test/java/org/mockitousage/verification/ |
D | RelaxedVerificationInOrderTest.java | 27 private IMethods mockTwo; field in RelaxedVerificationInOrderTest 34 mockTwo = mock(IMethods.class); in setUp() 37 inOrder = inOrder(mockOne, mockTwo, mockThree); in setUp() 40 mockTwo.simpleMethod(2); in setUp() 41 mockTwo.simpleMethod(2); in setUp() 43 mockTwo.simpleMethod(2); in setUp() 50 inOrder.verify(mockTwo, times(2)).simpleMethod(2); in shouldVerifyInOrderAllInvocations() 52 inOrder.verify(mockTwo).simpleMethod(2); in shouldVerifyInOrderAllInvocations() 54 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldVerifyInOrderAllInvocations() 59 inOrder.verify(mockTwo, times(2)).simpleMethod(2); in shouldVerifyInOrderAndBeRelaxed() [all …]
|
D | SelectedMocksInOrderVerificationTest.java | 22 private IMethods mockTwo; field in SelectedMocksInOrderVerificationTest 28 mockTwo = mock(IMethods.class); in setUp() 32 mockTwo.simpleMethod(2); in setUp() 33 mockTwo.simpleMethod(2); in setUp() 35 mockTwo.simpleMethod(2); in setUp() 41 InOrder inOrder = inOrder(mockOne, mockTwo, mockThree); in shouldVerifyAllInvocationsInOrder() 43 inOrder.verify(mockTwo, times(2)).simpleMethod(2); in shouldVerifyAllInvocationsInOrder() 45 inOrder.verify(mockTwo).simpleMethod(2); in shouldVerifyAllInvocationsInOrder() 47 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldVerifyAllInvocationsInOrder() 52 InOrder inOrder = inOrder(mockTwo, mockThree); in shouldVerifyInOrderMockTwoAndThree() [all …]
|
D | BasicVerificationInOrderTest.java | 25 private IMethods mockTwo; field in BasicVerificationInOrderTest 32 mockTwo = mock(IMethods.class); in setUp() 35 inOrder = inOrder(mockOne, mockTwo, mockThree); in setUp() 38 mockTwo.simpleMethod(2); in setUp() 39 mockTwo.simpleMethod(2); in setUp() 41 mockTwo.simpleMethod(2); in setUp() 48 inOrder.verify(mockTwo, times(2)).simpleMethod(2); in shouldVerifyInOrder() 50 inOrder.verify(mockTwo).simpleMethod(2); in shouldVerifyInOrder() 52 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldVerifyInOrder() 58 inOrder.verify(mockTwo, times(2)).simpleMethod(2); in shouldVerifyInOrderUsingAtLeastOnce() [all …]
|
D | VerificationInOrderMixedWithOrdiraryVerificationTest.java | 23 private IMethods mockTwo; field in VerificationInOrderMixedWithOrdiraryVerificationTest 30 mockTwo = mock(IMethods.class); in setUp() 35 mockTwo.simpleMethod(2); in setUp() 47 verify(mockTwo).simpleMethod(2); in shouldMixVerificationInOrderAndOrdinaryVerification() 49 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldMixVerificationInOrderAndOrdinaryVerification() 58 verify(mockTwo).simpleMethod(2); in shouldAllowOrdinarilyVerifyingMockPassedToInOrderObject() 60 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldAllowOrdinarilyVerifyingMockPassedToInOrderObject() 66 verify(mockTwo).simpleMethod(2); in shouldAllowRedundantVerifications() 74 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldAllowRedundantVerifications() 84 verifyNoMoreInteractions(mockOne, mockTwo, mockThree); in shouldFailOnNoMoreInteractions() [all …]
|
D | VerificationInOrderWithCallsTest.java | 23 @Mock private IMethods mockTwo; field in VerificationInOrderWithCallsTest 110 mockTwo.voidMethod(); in shouldFailWhenMethodCallsOnDifferentMocksAreOutOfSequence() 112 InOrder verifier = inOrder( mockOne, mockTwo ); in shouldFailWhenMethodCallsOnDifferentMocksAreOutOfSequence() 113 verifier.verify( mockTwo, calls(1)).voidMethod(); in shouldFailWhenMethodCallsOnDifferentMocksAreOutOfSequence() 171 mockTwo.voidMethod(); in shouldAllowSequentialCallsToCallsForMethodsOnDifferentMocks() 172 mockTwo.voidMethod(); in shouldAllowSequentialCallsToCallsForMethodsOnDifferentMocks() 175 InOrder verifier = inOrder( mockOne, mockTwo ); in shouldAllowSequentialCallsToCallsForMethodsOnDifferentMocks() 179 verifier.verify( mockTwo, calls(2)).voidMethod(); in shouldAllowSequentialCallsToCallsForMethodsOnDifferentMocks() 182 verifyNoMoreInteractions(mockTwo); in shouldAllowSequentialCallsToCallsForMethodsOnDifferentMocks() 315 mockTwo.voidMethod(); in shouldAllowFewerCallsForMethodsOnDifferentMocks() [all …]
|
D | VerificationInOrderTest.java | 23 private IMethods mockTwo; field in VerificationInOrderTest 30 mockTwo = mock(IMethods.class); in setUp() 33 inOrder = inOrder(mockOne, mockTwo, mockThree); in setUp() 56 mockTwo.differentMethod(); in shouldMessagesPointToProperMethod() 71 mockTwo.differentMethod(); in shouldVerifyInOrderWhenTwoChunksAreEqual() 76 inOrder.verify(mockTwo).differentMethod(); in shouldVerifyInOrderWhenTwoChunksAreEqual() 88 mockTwo.differentMethod(); in shouldVerifyInOrderUsingMatcher() 95 inOrder.verify(mockTwo).differentMethod(); in shouldVerifyInOrderUsingMatcher()
|
D | BasicVerificationTest.java | 27 @Mock private List<String> mockTwo; field in BasicVerificationTest 65 mockTwo.add("add"); in shouldFailOnWrongMethod() 68 verify(mockTwo, atLeastOnce()).add("add"); in shouldFailOnWrongMethod() 70 verify(mockTwo, atLeastOnce()).add("foo"); in shouldFailOnWrongMethod()
|
D | OrdinaryVerificationPrintsAllInteractionsTest.java | 21 @Mock private IMethods mockTwo; field in OrdinaryVerificationPrintsAllInteractionsTest 67 mockTwo.simpleMethod(); in differentMockInteraction()
|
/external/mockito/src/test/java/org/mockitousage/stacktrace/ |
D | PointingStackTraceToActualInvocationChunkInOrderTest.java | 26 @Mock private IMethods mockTwo; field in PointingStackTraceToActualInvocationChunkInOrderTest 31 inOrder = inOrder(mock, mockTwo); in setup() 44 mockTwo.simpleMethod(2); in secondChunk() 45 mockTwo.simpleMethod(2); in secondChunk() 52 mockTwo.simpleMethod(4); in fourthChunk() 53 mockTwo.simpleMethod(4); in fourthChunk() 59 inOrder.verify(mockTwo, times(2)).simpleMethod(anyInt()); in shouldPointStackTraceToPreviousInvocation() 74 inOrder.verify(mockTwo).simpleMethod(999); in shouldPointToThirdInteractionBecauseAtLeastOnceUsed() 84 inOrder.verify(mockTwo, times(2)).simpleMethod(anyInt()); in shouldPointToThirdChunkWhenTooLittleActualInvocations() 88 inOrder.verify(mockTwo, times(3)).simpleMethod(999); in shouldPointToThirdChunkWhenTooLittleActualInvocations() [all …]
|
D | PointingStackTraceToActualInvocationInOrderTest.java | 27 @Mock private IMethods mockTwo; field in PointingStackTraceToActualInvocationInOrderTest 32 inOrder = inOrder(mock, mockTwo); in setup() 44 mockTwo.simpleMethod(2); in second() 50 mockTwo.simpleMethod(4); in fourth() 56 inOrder.verify(mockTwo).simpleMethod(anyInt()); in shouldPointStackTraceToPreviousVerified() 71 inOrder.verify(mockTwo).simpleMethod(999); in shouldPointToThirdMethod() 81 inOrder.verify(mockTwo).simpleMethod(anyInt()); in shouldPointToSecondMethod() 84 inOrder.verify(mockTwo, times(3)).simpleMethod(999); in shouldPointToSecondMethod() 106 inOrder.verify(mockTwo, times(0)).simpleMethod(anyInt()); in shouldPointToSecondMethodBecauseOfTooManyActualInvocations() 116 inOrder.verify(mockTwo).simpleMethod(anyInt()); in shouldPointToFourthMethodBecauseOfTooLittleActualInvocations() [all …]
|
D | PointingStackTraceToActualInvocationTest.java | 27 @Mock private IMethods mockTwo; field in PointingStackTraceToActualInvocationTest 41 mockTwo.simpleMethod(2); in second() 47 mockTwo.simpleMethod(4); in fourth()
|
/external/mockito/src/test/java/org/mockitousage/basicapi/ |
D | ResetTest.java | 25 private IMethods mockTwo; field in ResetTest 66 IMethods mockTwo = mock(IMethods.class); in shouldRemoveStubbingToString() local 67 when(mockTwo.toString()).thenReturn("test"); in shouldRemoveStubbingToString() 68 reset(mockTwo); in shouldRemoveStubbingToString() 69 assertThat(mockTwo.toString()).contains("Mock for IMethods"); in shouldRemoveStubbingToString() 83 IMethods mockTwo = mock(IMethods.class); in shouldNotAffectMockName() local 85 assertThat(mockTwo.toString()).contains("Mock for IMethods"); in shouldNotAffectMockName() 92 mockTwo.simpleMethod(); in shouldResetMultipleMocks() 93 reset(mock, mockTwo); in shouldResetMultipleMocks() 94 verifyNoMoreInteractions(mock, mockTwo); in shouldResetMultipleMocks() [all …]
|
D | MocksSerializationTest.java | 338 …IMethods mockTwo = mock(IMethods.class, withSettings().extraInterfaces(List.class).serializable()); in should_be_serialize_and_have_extra_interfaces() local 344 Assertions.assertThat((Object) serializeAndBack((List) mockTwo)) in should_be_serialize_and_have_extra_interfaces()
|
/external/mockito/src/test/java/org/mockito/internal/ |
D | AllInvocationsFinderTest.java | 28 private IMethods mockTwo; field in AllInvocationsFinderTest 34 mockTwo = 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() 48 mockTwo.simpleMethod(200); in provides_invocations_in_order() 52 List<Invocation> invocations = find(asList(mockOne, mockTwo)); in provides_invocations_in_order() 79 when(mockTwo.simpleMethod(300)).thenReturn("300"); in provides_stubbings_in_order() 82 …st<Stubbing> stubbings = new ArrayList<Stubbing>(findStubbings(asList(mockOne, mockOne, mockTwo))); in provides_stubbings_in_order()
|
/external/mockito/src/test/java/org/mockitousage/bugs/ |
D | VerifyingWithAnExtraCallToADifferentMockTest.java | 21 @Mock IMethods mockTwo; field in VerifyingWithAnExtraCallToADifferentMockTest 29 mockTwo.simpleMethod("foo"); in shouldAllowVerifyingWhenOtherMockCallIsInTheSameLine() 32 verify(mockTwo).simpleMethod(mock.otherMethod()); in shouldAllowVerifyingWhenOtherMockCallIsInTheSameLine() 34 verify(mockTwo, never()).simpleMethod(mock.otherMethod()); in shouldAllowVerifyingWhenOtherMockCallIsInTheSameLine()
|
/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | StubbingWithThrowablesTest.java | 43 private Map mockTwo; field in StubbingWithThrowablesTest 51 mockTwo = mock(HashMap.class); in setup() 301 doThrow(new ExceptionThree()).when(mockTwo).clear(); in shouldMixThrowablesAndReturnsOnDifferentMocks() 302 when(mockTwo.containsValue("ExceptionFour")).thenThrow(new ExceptionFour()); in shouldMixThrowablesAndReturnsOnDifferentMocks() 303 when(mockTwo.get("Are you there?")).thenReturn("Yes!"); in shouldMixThrowablesAndReturnsOnDifferentMocks() 305 assertNull(mockTwo.get("foo")); in shouldMixThrowablesAndReturnsOnDifferentMocks() 306 assertTrue(mockTwo.keySet().isEmpty()); in shouldMixThrowablesAndReturnsOnDifferentMocks() 307 assertEquals("Yes!", mockTwo.get("Are you there?")); in shouldMixThrowablesAndReturnsOnDifferentMocks() 309 mockTwo.clear(); in shouldMixThrowablesAndReturnsOnDifferentMocks() 314 mockTwo.containsValue("ExceptionFour"); in shouldMixThrowablesAndReturnsOnDifferentMocks()
|
D | BasicStubbingTest.java | 54 IMethods mockTwo = mock(IMethods.class); in should_allow_stubbing_to_string() local 55 when(mockTwo.toString()).thenReturn("test"); in should_allow_stubbing_to_string() 58 assertThat(mockTwo.toString()).isEqualTo("test"); in should_allow_stubbing_to_string() 84 IMethods mockTwo = mock(IMethods.class); in should_to_string_mock_name() local 86 assertThat(mockTwo.toString()).contains("Mock for IMethods"); in should_to_string_mock_name()
|
/external/mockito/src/test/java/org/mockitousage/misuse/ |
D | InvalidUsageTest.java | 23 @Mock private IMethods mockTwo; field in InvalidUsageTest 49 inOrder.verify(mockTwo).simpleMethod(); in shouldNotAllowVerifyingInOrderUnfamilarMocks()
|
/external/mockito/src/test/java/org/mockitousage/ |
D | PlaygroundTest.java | 35 @Mock IMethods mockTwo; field in PlaygroundTest
|
/external/mockito/src/test/java/org/mockito/internal/creation/bytebuddy/ |
D | AbstractByteBuddyMockMakerTest.java | 72 SomeClass mockTwo = mockMaker.createMock(settingsFor(SomeClass.class), dummyHandler()); in should_mocks_have_different_interceptors() local 75 MockHandler handlerTwo = mockMaker.getHandler(mockTwo); in should_mocks_have_different_interceptors()
|