Home
last modified time | relevance | path

Searched refs:mock2 (Results 1 – 15 of 15) sorted by relevance

/external/mockito/src/test/java/org/mockitousage/internal/junit/
DUnusedStubbingsFinderTest.java27 @Mock IMethods mock2; field in UnusedStubbingsFinderTest
32 assertEquals(0, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in no_interactions()
33 assertEquals(0, finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)).size()); in no_interactions()
42 assertEquals(0, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in no_stubbings()
43 assertEquals(0, finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)).size()); in no_stubbings()
53 assertEquals(0, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in no_unused_stubbings()
54 assertEquals(0, finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)).size()); in no_unused_stubbings()
63 assertEquals(1, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in unused_stubbings()
64 assertEquals(1, finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)).size()); in unused_stubbings()
70 when(mock2.simpleMethod(2)).thenReturn("2"); in some_unused_stubbings()
[all …]
/external/mockito/src/test/java/org/mockito/internal/junit/
DArgMismatchFinderTest.java18 @Mock IMethods mock2; field in ArgMismatchFinderTest
23 … StubbingArgMismatches mismatches = finder.getStubbingArgMismatches((List) asList(mock1, mock2)); in no_interactions()
33 mock2.simpleMethod(2); //arg mismatch on different mock in no_mismatch_when_mock_different()
36 … StubbingArgMismatches mismatches = finder.getStubbingArgMismatches((List) asList(mock1, mock2)); in no_mismatch_when_mock_different()
49 … StubbingArgMismatches mismatches = finder.getStubbingArgMismatches((List) asList(mock1, mock2)); in no_mismatch_when_method_different()
63 … StubbingArgMismatches mismatches = finder.getStubbingArgMismatches((List) asList(mock1, mock2)); in no_mismatch_when_stubbing_used()
76 … StubbingArgMismatches mismatches = finder.getStubbingArgMismatches((List) asList(mock1, mock2)); in stubbing_mismatch()
90 … StubbingArgMismatches mismatches = finder.getStubbingArgMismatches((List) asList(mock1, mock2)); in single_mismatch_with_multiple_invocations()
105 … StubbingArgMismatches mismatches = finder.getStubbingArgMismatches((List) asList(mock1, mock2)); in single_invocation_with_multiple_stubs()
122 … StubbingArgMismatches mismatches = finder.getStubbingArgMismatches((List) asList(mock1, mock2)); in mismatch_reports_only_unstubbed_invocations()
/external/mockito/src/test/java/org/mockitousage/verification/
DFindingRedundantInvocationsInOrderTest.java24 @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()
DOnlyVerificationTest.java25 @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/
DStrictJUnitRuleTest.java26 @Mock IMethods mock2; field in StrictJUnitRuleTest
50 mock2.simpleMethod(10); in fails_when_unused_stubbings()
145 given(mock2.simpleMethod(20)).willReturn("foo"); in unused_stubs_with_multiple_mocks()
151 mock2.booleanObjectReturningMethod(); in unused_stubs_with_multiple_mocks()
/external/mockito/src/test/java/org/mockitousage/bugs/
DNPEWhenMockingThrowablesTest.java19 @Mock DummyException mock2; field in NPEWhenMockingThrowablesTest
28 when(mock.simpleMethod()).thenThrow(mock2); in shouldNotThrowNPE()
DCovariantOverrideTest.java53 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/
DMultiReportVisitorTest.java120 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/
DUnusedStubsExceptionMessageTest.java24 IMethods mock2 = when(mock(IMethods.class).simpleMethod(2)).thenReturn("2").getMock(); field in UnusedStubsExceptionMessageTest.HasUnnecessaryStubs
34 assertEquals(null, mock2.simpleMethod(200)); in usesStubWithDifferentArg()
DSilentRunnerTest.java114 IMethods mock2 = when(mock(IMethods.class).simpleMethod(2)).thenReturn("2").getMock(); field in SilentRunnerTest.HasUnnecessaryStubs
124 assertEquals(null, mock2.simpleMethod(200)); in usesStubWithDifferentArg()
DStrictRunnerTest.java130 IMethods mock2 = mock(IMethods.class); field in StrictRunnerTest.WithUnrelatedAssertionFailure
133 when(mock2.simpleMethod("unused stubbing")).thenReturn(""); in before()
/external/mockito/src/test/java/org/mockito/internal/framework/
DDefaultMockitoFrameworkTest.java66 Set mock2 = mock(Set.class); in adds_creation_listener() local
70 verify(listener).onMockCreated(eq(mock2), any(MockCreationSettings.class)); in adds_creation_listener()
/external/mockito/src/test/java/org/mockito/internal/util/collections/
DHashCodeAndEqualsSafeSetTest.java46 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/
DMocksSerializationTest.java216 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/
Daudio_device_unittest_ios.cc681 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()