/external/mockito/src/test/java/org/mockito/internal/junit/ |
D | ArgMismatchFinderTest.java | 19 @Mock IMethods mock1; field in ArgMismatchFinderTest 25 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in no_interactions() 34 when(mock1.simpleMethod(1)).thenReturn("1"); in no_mismatch_when_mock_different() 38 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in no_mismatch_when_mock_different() 47 when(mock1.simpleMethod(1)).thenReturn("1"); in no_mismatch_when_method_different() 48 mock1.otherMethod(); in no_mismatch_when_method_different() 51 StubbingArgMismatches mismatches = finder.getStubbingArgMismatches(asList(mock1, mock2)); in no_mismatch_when_method_different() 60 when(mock1.simpleMethod(1)).thenReturn("1"); in no_mismatch_when_stubbing_used() 61 mock1.simpleMethod(1); // stub used in no_mismatch_when_stubbing_used() 62 mock1.simpleMethod(2); // no stubbing, but we don't want it to be reported, either in no_mismatch_when_stubbing_used() [all …]
|
/external/mockito/src/test/java/org/mockitousage/internal/junit/ |
D | UnusedStubbingsFinderTest.java | 31 @Mock IMethods mock1; 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() 44 mock1.simpleMethod(); in no_stubbings() 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() 54 when(mock1.simpleMethod()).thenReturn("1"); in no_unused_stubbings() 55 mock1.simpleMethod(); in no_unused_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() [all …]
|
/external/mockito/src/test/java/org/mockito/internal/util/collections/ |
D | HashCodeAndEqualsSafeSetTest.java | 27 private UnmockableHashCodeAndEquals mock1; field in HashCodeAndEqualsSafeSetTest 31 new HashCodeAndEqualsSafeSet().add(mock1); in can_add_mock_that_have_failing_hashCode_method() 36 new HashCodeAndEqualsSafeSet().add(mock1); in mock_with_failing_hashCode_method_can_be_added() 42 mocks.add(mock1); in mock_with_failing_equals_method_can_be_used() 44 assertThat(mocks.contains(mock1)).isTrue(); in mock_with_failing_equals_method_can_be_used() 53 UnmockableHashCodeAndEquals mock = mock1; in can_remove() 64 mock1, in can_add_a_collection() 77 mock1, in can_retain_a_collection() 92 mock1, in can_remove_a_collection() 107 mock1, in can_iterate() [all …]
|
/external/mockito/src/test/java/org/mockitousage/verification/ |
D | VerificationStartedListenerTest.java | 34 final List mock1 = mock(List.class); in verified_mock_can_be_replaced() local 35 mock1.clear(); //register clear() on mock1 in verified_mock_can_be_replaced() 41 event.setMock(mock1); in verified_mock_can_be_replaced() 47 assertEquals(mock1, verifiedMock); in verified_mock_can_be_replaced() 79 final List mock1 = mock(List.class); in listeners_are_executed_in_sequence() local 85 event.setMock(mock1); in listeners_are_executed_in_sequence() 100 Assertions.assertThat(container).containsExactly(mock2, mock1); in listeners_are_executed_in_sequence()
|
/external/jacoco/org.jacoco.report.test/src/org/jacoco/report/ |
D | MultiReportVisitorTest.java | 119 IReportVisitor mock1 = new MockVisitor(); in testMultiFormatter() local 122 List<IReportVisitor> visitors = Arrays.asList(mock1, mock2, mock3); in testMultiFormatter() 125 assertEquals(MOCK_REPORT, mock1.toString()); in testMultiFormatter()
|
/external/mockito/src/test/java/org/mockitousage/junitrunner/ |
D | UnusedStubsExceptionMessageTest.java | 27 IMethods mock1 = when(mock(IMethods.class).simpleMethod(1)).thenReturn("1").getMock(); field in UnusedStubsExceptionMessageTest.HasUnnecessaryStubs 33 assertEquals("1", mock1.simpleMethod(1)); in usesStub()
|
D | SilentRunnerTest.java | 119 IMethods mock1 = when(mock(IMethods.class).simpleMethod(1)).thenReturn("1").getMock(); field in SilentRunnerTest.HasUnnecessaryStubs 125 assertEquals("1", mock1.simpleMethod(1)); in usesStub()
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | CompositeReadableBufferTest.java | 159 ReadableBuffer mock1 = mock(ReadableBuffer.class); in closeShouldCloseBuffers() local 161 composite.addBuffer(mock1); in closeShouldCloseBuffers() 165 verify(mock1).close(); in closeShouldCloseBuffers()
|
/external/python/mock/mock/tests/ |
D | testmagicmethods.py | 68 mock1 = Mock() 71 mock1.__iter__ = Mock(return_value=iter([])) 72 self.assertEqual(list(mock1), [])
|
D | testpatch.py | 232 def test(this1, this2, mock1, mock2): argument 237 self.assertEqual(mock1, Test.something2, 247 self.assertNotEqual(outerMock1, mock1, "unexpected value for mock1") 249 return mock1, mock2
|
/external/python/cpython3/Lib/unittest/test/testmock/ |
D | testmagicmethods.py | 50 mock1 = Mock() 53 mock1.__iter__ = Mock(return_value=iter([])) 54 self.assertEqual(list(mock1), [])
|
D | testpatch.py | 233 def test(this1, this2, mock1, mock2): argument 238 self.assertEqual(mock1, Test.something2, 248 self.assertNotEqual(outerMock1, mock1, "unexpected value for mock1") 250 return mock1, mock2
|
D | testasync.py | 506 mock1 = async_mock(1) 507 await mock1
|
/external/python/cpython3/Doc/library/ |
D | unittest.mock.rst | 1878 ... def test(mock1, mock2): 1879 ... assert SomeClass.static_method is mock1 1883 ... return mock1, mock2 1885 >>> mock1, mock2 = test() 1886 >>> mock1.assert_called_once_with('foo')
|