/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 | 30 @Mock IMethods mock1; field in UnusedStubbingsFinderTest 36 assertEquals(0, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in no_interactions() 37 assertEquals(0, finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)).size()); in no_interactions() 43 mock1.simpleMethod(); in no_stubbings() 46 assertEquals(0, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in no_stubbings() 47 assertEquals(0, finder.getUnusedStubbingsByLocation((List) asList(mock1, mock2)).size()); in no_stubbings() 53 when(mock1.simpleMethod()).thenReturn("1"); in no_unused_stubbings() 54 mock1.simpleMethod(); in no_unused_stubbings() 57 assertEquals(0, finder.getUnusedStubbings((List) asList(mock1, mock2)).size()); in no_unused_stubbings() 58 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 | 117 IMethods mock1 = when(mock(IMethods.class).simpleMethod(1)).thenReturn("1").getMock(); field in SilentRunnerTest.HasUnnecessaryStubs 123 assertEquals("1", mock1.simpleMethod(1)); in usesStub()
|
/external/python/cpython3/Lib/unittest/test/testmock/ |
D | testmagicmethods.py | 48 mock1 = Mock() 51 mock1.__iter__ = Mock(return_value=iter([])) 52 self.assertEqual(list(mock1), [])
|
D | testpatch.py | 226 def test(this1, this2, mock1, mock2): argument 231 self.assertEqual(mock1, Test.something2, 241 self.assertNotEqual(outerMock1, mock1, "unexpected value for mock1") 243 return mock1, mock2
|
/external/python/cpython3/Doc/library/ |
D | unittest.mock.rst | 1528 ... def test(mock1, mock2): 1529 ... assert SomeClass.static_method is mock1 1533 ... return mock1, mock2 1535 >>> mock1, mock2 = test() 1536 >>> mock1.assert_called_once_with('foo')
|