/external/mockito/src/test/java/org/mockitousage/internal/junit/ |
D | UnusedStubbingsFinderTest.java | 32 @Mock IMethods mock2; field in UnusedStubbingsFinderTest 37 assertEquals(0, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in no_interactions() 38 assertEquals(0, finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)).size()); in no_interactions() 47 assertEquals(0, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in no_stubbings() 48 assertEquals(0, finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)).size()); in no_stubbings() 58 assertEquals(0, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in no_unused_stubbings() 59 assertEquals(0, finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)).size()); in no_unused_stubbings() 68 assertEquals(1, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in unused_stubbings() 69 assertEquals(1, finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)).size()); in unused_stubbings() 75 when(mock2.simpleMethod(2)).thenReturn("2"); in some_unused_stubbings() [all …]
|
/external/mockito/src/test/java/org/mockito/internal/junit/ |
D | ArgMismatchFinderTest.java | 20 @Mock IMethods mock2; field in ArgMismatchFinderTest 25 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in no_interactions() 35 mock2.simpleMethod(2); //arg mismatch on different mock in no_mismatch_when_mock_different() 38 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in no_mismatch_when_mock_different() 51 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in no_mismatch_when_method_different() 65 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in no_mismatch_when_stubbing_used() 78 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in stubbing_mismatch() 92 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in single_mismatch_with_multiple_invocations() 107 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in single_invocation_with_multiple_stubs() 124 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in mismatch_reports_only_unstubbed_invocations()
|
/external/mockito/src/test/java/org/mockitousage/verification/ |
D | FindingRedundantInvocationsInOrderTest.java | 24 @Mock private IMethods mock2; field in FindingRedundantInvocationsInOrderTest 68 mock2.simpleMethod(); in shouldVerifyNoMoreInteractionsInOrderWithMultipleMocks() 72 InOrder inOrder = inOrder(mock, mock2); in shouldVerifyNoMoreInteractionsInOrderWithMultipleMocks() 73 inOrder.verify(mock2).simpleMethod(); in shouldVerifyNoMoreInteractionsInOrderWithMultipleMocks() 98 mock2.simpleMethod(); in shouldFailToVerifyNoMoreInteractionsInOrderWithMultipleMocks() 102 InOrder inOrder = inOrder(mock, mock2); in shouldFailToVerifyNoMoreInteractionsInOrderWithMultipleMocks() 103 inOrder.verify(mock2).simpleMethod(); in shouldFailToVerifyNoMoreInteractionsInOrderWithMultipleMocks()
|
D | VerificationStartedListenerTest.java | 38 …List mock2 = mock(List.class, Mockito.withSettings().verificationStartedListeners(new Verification… in verified_mock_can_be_replaced() local 46 List verifiedMock = verify(mock2); in verified_mock_can_be_replaced() 81 …List mock2 = mock(List.class, Mockito.withSettings().verificationStartedListeners(new Verification… in listeners_are_executed_in_sequence() local 95 verify(mock2, never()).clear(); in listeners_are_executed_in_sequence() 100 Assertions.assertThat(container).containsExactly(mock2, mock1); in listeners_are_executed_in_sequence()
|
D | OnlyVerificationTest.java | 25 @Mock private List<Object> mock2; field in OnlyVerificationTest 81 mock2.get(0); in shouldVerifyMethodWasInvokedExclusivelyWhenTwoMocksInUse() 83 verify(mock2, only()).get(0); in shouldVerifyMethodWasInvokedExclusivelyWhenTwoMocksInUse()
|
/external/mockito/src/test/java/org/mockitousage/junitrule/ |
D | StrictJUnitRuleTest.java | 32 @Mock IMethods mock2; field in StrictJUnitRuleTest 56 mock2.simpleMethod(10); in fails_when_unused_stubbings() 151 given(mock2.simpleMethod(20)).willReturn("foo"); in unused_stubs_with_multiple_mocks() 157 mock2.booleanObjectReturningMethod(); in unused_stubs_with_multiple_mocks()
|
/external/mockito/src/test/java/org/mockitousage/bugs/ |
D | NPEWhenMockingThrowablesTest.java | 19 @Mock DummyException mock2; field in NPEWhenMockingThrowablesTest 28 when(mock.simpleMethod()).thenThrow(mock2); in shouldNotThrowNPE()
|
D | CovariantOverrideTest.java | 53 ReturnsObject mock2 = mock; // Switch to base type to call covariant override in returnFoo4() local 54 verify(mock2).callMe(); // Fails: java.lang.AssertionError: expected:<foo> but was:<null> in returnFoo4()
|
/external/jacoco/org.jacoco.report.test/src/org/jacoco/report/ |
D | MultiReportVisitorTest.java | 120 IReportVisitor mock2 = new MockVisitor(); in testMultiFormatter() local 122 List<IReportVisitor> visitors = Arrays.asList(mock1, mock2, mock3); in testMultiFormatter() 126 assertEquals(MOCK_REPORT, mock2.toString()); in testMultiFormatter()
|
/external/mockito/src/test/java/org/mockitousage/junitrunner/ |
D | UnusedStubsExceptionMessageTest.java | 28 IMethods mock2 = when(mock(IMethods.class).simpleMethod(2)).thenReturn("2").getMock(); field in UnusedStubsExceptionMessageTest.HasUnnecessaryStubs 38 assertEquals(null, mock2.simpleMethod(200)); in usesStubWithDifferentArg()
|
D | SilentRunnerTest.java | 120 IMethods mock2 = when(mock(IMethods.class).simpleMethod(2)).thenReturn("2").getMock(); field in SilentRunnerTest.HasUnnecessaryStubs 130 assertEquals(null, mock2.simpleMethod(200)); in usesStubWithDifferentArg()
|
D | StrictRunnerTest.java | 134 IMethods mock2 = mock(IMethods.class); field in StrictRunnerTest.WithUnrelatedAssertionFailure 137 when(mock2.simpleMethod("unused stubbing")).thenReturn(""); in before()
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | CompositeReadableBufferTest.java | 160 ReadableBuffer mock2 = mock(ReadableBuffer.class); in closeShouldCloseBuffers() local 162 composite.addBuffer(mock2); in closeShouldCloseBuffers() 166 verify(mock2).close(); in closeShouldCloseBuffers()
|
/external/mockito/src/test/java/org/mockito/internal/framework/ |
D | DefaultMockitoFrameworkTest.java | 69 Set mock2 = mock(Set.class); in adds_creation_listener() local 73 verify(listener).onMockCreated(eq(mock2), any(MockCreationSettings.class)); in adds_creation_listener()
|
/external/mockito/src/test/java/org/mockitousage/session/ |
D | MockitoSessionTest.java | 178 IMethods mock2 = Mockito.mock(IMethods.class, "manual mock"); field in MockitoSessionTest.SessionWithManuallyInitializedMock 188 …assertEquals("manual mock", mockingDetails(mock2).getMockCreationSettings().getMockName().toString… in manual_mock_preserves_its_settings()
|
/external/mockito/src/test/java/org/mockito/internal/util/collections/ |
D | HashCodeAndEqualsSafeSetTest.java | 46 UnmockableHashCodeAndEquals mock2 = mock(UnmockableHashCodeAndEquals.class); in mock_with_failing_equals_method_can_be_used() local 47 assertThat(mocks.contains(mock2)).isFalse(); in mock_with_failing_equals_method_can_be_used()
|
/external/mockito/src/test/java/org/mockitousage/basicapi/ |
D | MocksSerializationTest.java | 216 IMethods mock2 = mock(IMethods.class, withSettings().serializable()); in should_verify_call_order_for_serialized_mock() local 218 mock2.arrayReturningMethod(); in should_verify_call_order_for_serialized_mock() 222 ByteArrayOutputStream serialized2 = serializeMock(mock2); in should_verify_call_order_for_serialized_mock()
|
/external/webrtc/webrtc/modules/audio_device/ios/ |
D | audio_device_unittest_ios.cc | 681 MockAudioTransport mock2(kPlayout); in TEST_F() local 682 mock2.HandleCallbacks(test_is_done_.get(), nullptr, kNumCallbacks); in TEST_F() 684 mock2, NeedMorePlayData(playout_frames_per_10ms_buffer(), kBytesPerSample, in TEST_F() 688 EXPECT_EQ(0, second_audio_device->RegisterAudioCallback(&mock2)); in TEST_F()
|
/external/python/cpython3/Lib/unittest/test/testmock/ |
D | testpatch.py | 227 def test(this1, this2, mock1, mock2): argument 234 self.assertEqual(mock2, Test.something, 236 self.assertIsInstance(mock2, MagicMock, 238 self.assertIsInstance(mock2, MagicMock, 243 self.assertNotEqual(outerMock2, mock2, "unexpected value for mock1") 244 return mock1, mock2
|
D | testmagicmethods.py | 49 mock2 = Mock() 53 self.assertRaises(TypeError, lambda: list(mock2))
|
/external/python/mock/mock/tests/ |
D | testpatch.py | 231 def test(this1, this2, mock1, mock2): argument 238 self.assertEqual(mock2, Test.something, 240 self.assertIsInstance(mock2, MagicMock, 242 self.assertIsInstance(mock2, MagicMock, 247 self.assertNotEqual(outerMock2, mock2, "unexpected value for mock1") 248 return mock1, mock2
|
D | testmagicmethods.py | 68 mock2 = Mock() 72 self.assertRaises(TypeError, lambda: list(mock2))
|
/external/python/cpython3/Doc/library/ |
D | unittest.mock.rst | 1562 ... def test(mock1, mock2): 1564 ... assert SomeClass.class_method is mock2 1567 ... return mock1, mock2 1569 >>> mock1, mock2 = test() 1571 >>> mock2.assert_called_once_with('bar')
|