Home
last modified time | relevance | path

Searched refs:IMethods (Results 1 – 25 of 133) sorted by relevance

123456

/external/mockito/src/test/java/org/mockitousage/
DCompilationWarningsTest.java23 doReturn(null).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()
24 doReturn("a", 12).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()
25 doReturn(1000).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()
26 … doThrow(new NullPointerException()).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()
27 …doThrow(new NullPointerException(), new IllegalArgumentException()).when(mock(IMethods.class)).obj… in no_warnings_for_most_common_api()
28 … doThrow(NullPointerException.class).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()
30 doAnswer(ignore()).doReturn(null).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()
31 … doAnswer(ignore()).doReturn("a", 12).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()
32 doAnswer(ignore()).doReturn(1000).when(mock(IMethods.class)).objectReturningMethodNoArgs(); in no_warnings_for_most_common_api()
33 …doAnswer(ignore()).doThrow(new NullPointerException()).when(mock(IMethods.class)).objectReturningM… in no_warnings_for_most_common_api()
[all …]
/external/mockito/src/test/java/org/mockitousage/basicapi/
DMocksSerializationTest.java17 import org.mockitousage.IMethods;
60 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_allow_mock_to_be_serializable()
69 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_allow_mock_and_boolean_value_to_serializable()
76 IMethods readObject = deserializeMock(serialized, IMethods.class); in should_allow_mock_and_boolean_value_to_serializable()
83 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_allow_mock_and_string_value_to_be_serializable()
91 IMethods readObject = deserializeMock(serialized, IMethods.class); in should_allow_mock_and_string_value_to_be_serializable()
98 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_all_mock_and_serializable_value_to_be_serialized()
106 IMethods readObject = deserializeMock(serialized, IMethods.class); in should_all_mock_and_serializable_value_to_be_serialized()
112 IMethods mock = mock(IMethods.class, withSettings().serializable()); in should_serialize_method_call_with_parameters_that_are_serializable()
120 IMethods readObject = deserializeMock(serialized, IMethods.class); in should_serialize_method_call_with_parameters_that_are_serializable()
[all …]
DMocksSerializationForAnnotationTest.java17 import org.mockitousage.IMethods;
37 @Mock(serializable=true) IMethods imethodsMock;
38 @Mock(serializable=true) IMethods imethodsMock2;
41 @Mock(extraInterfaces={List.class},serializable=true) IMethods imethodsWithExtraInterfacesMock;
67 IMethods readObject = deserializeMock(serialized, IMethods.class); in should_allow_mock_and_boolean_value_to_serializable()
81 IMethods readObject = deserializeMock(serialized, IMethods.class); in should_allow_mock_and_string_value_to_be_serializable()
95 IMethods readObject = deserializeMock(serialized, IMethods.class); in should_all_mock_and_serializable_value_to_be_serialized()
108 IMethods readObject = deserializeMock(serialized, IMethods.class); in should_serialize_method_call_with_parameters_that_are_serializable()
121 IMethods readObject = deserializeMock(serialized, IMethods.class); in should_serialize_method_calls_using_any_string_matcher()
135 IMethods readObject = deserializeMock(serialized, IMethods.class); in should_verify_called_n_times_for_serialized_mock()
[all …]
DResetTest.java12 import org.mockitousage.IMethods;
22 private IMethods mock;
25 private IMethods mockTwo;
66 IMethods mockTwo = mock(IMethods.class); in shouldRemoveStubbingToString()
82 IMethods mock = mock(IMethods.class, "mockie"); in shouldNotAffectMockName()
83 IMethods mockTwo = mock(IMethods.class); in shouldNotAffectMockName()
113 mock = mock(IMethods.class, RETURNS_MOCKS); in shouldMaintainPreviousDefaultAnswer()
DMocksCreationTest.java12 import org.mockitousage.IMethods;
36 IMethods mock = mock(IMethods.class, withSettings() in shouldCombineMockNameAndSmartNulls()
41 IMethods smartNull = mock.iMethodsReturningMethod(); in shouldCombineMockNameAndSmartNulls()
56 IMethods mock = mock(IMethods.class, withSettings() in shouldCombineMockNameAndExtraInterfaces()
72 IMethods mock = mock(IMethods.class, withSettings().name("great mockie")); in shouldSpecifyMockNameViaSettings()
/external/mockito/src/test/java/org/mockitousage/junitrule/
DVerificationCollectorImplTest.java14 import org.mockitousage.IMethods;
26 IMethods methods = mock(IMethods.class); in should_not_throw_any_exceptions_when_verifications_are_successful()
37 IMethods methods = mock(IMethods.class); in should_collect_verification_failures()
47 IMethods methods = mock(IMethods.class); in should_collect_multiple_verification_failures()
64 IMethods methods = mock(IMethods.class); in should_only_collect_failures_ignore_successful_verifications()
76 IMethods methods = mock(IMethods.class); in should_continue_collecting_after_failing_verification()
112 IMethods methods = mock(IMethods.class); in should_fail()
119 IMethods methods = mock(IMethods.class); in should_not_fail()
/external/mockito/src/test/java/org/mockitousage/junitrunner/
DStrictRunnerTest.java18 import org.mockitousage.IMethods;
90 IMethods mock = when(mock(IMethods.class).simpleMethod(1)).thenReturn("1").getMock();
103 @Mock IMethods mock;
113 IMethods mock = mock(IMethods.class); in test()
122 IMethods mock = mock(IMethods.class); in test()
133 IMethods mock = mock(IMethods.class);
134 IMethods mock2 = mock(IMethods.class);
154 IMethods mock = mock(IMethods.class);
165 IMethods mock = mock(IMethods.class);
DUnusedStubsExceptionMessageTest.java13 import org.mockitousage.IMethods;
27 IMethods mock1 = when(mock(IMethods.class).simpleMethod(1)).thenReturn("1").getMock();
28 IMethods mock2 = when(mock(IMethods.class).simpleMethod(2)).thenReturn("2").getMock();
29 IMethods mock3 = when(mock(IMethods.class).simpleMethod(3)).thenReturn("3").getMock();
DStubbingWarningsJUnitRunnerTest.java15 import org.mockitousage.IMethods;
66 IMethods mock = mock(IMethods.class);
75 @Mock IMethods mock;
85 @Mock IMethods mock;
95 @Mock IMethods mock;
109 @Mock IMethods mock;
121 @Mock IMethods mock;
DVerboseMockitoRunnerTest.java16 import org.mockitousage.IMethods;
28 @Mock private IMethods mock;
35 IMethods mock = mock(IMethods.class); in test()
53 IMethods mock = mock(IMethods.class); in _test()
/external/mockito/src/test/java/org/mockitousage/stubbing/
DBasicStubbingTest.java13 import org.mockitousage.IMethods;
23 private IMethods mock;
27 mock = mock(IMethods.class); in setup()
54 IMethods mockTwo = mock(IMethods.class); in should_allow_stubbing_to_string()
83 IMethods mock = mock(IMethods.class, "mockie"); in should_to_string_mock_name()
84 IMethods mockTwo = mock(IMethods.class); in should_to_string_mock_name()
104 IMethods localMock = mock(IMethods.class, withSettings().stubOnly()); in test_stub_only_not_verifiable()
122 IMethods localMock = mock(IMethods.class, withSettings().stubOnly()); in test_stub_only_not_verifiable_fail_fast()
DStubbingWithAdditionalAnswersTest.java38 import org.mockitousage.IMethods;
45 @Mock IMethods iMethods;
102 final IMethods target = mock(IMethods.class); in will_execute_a_void_based_on_strongly_typed_one_parameter_function()
132 final IMethods target = mock(IMethods.class); in will_execute_a_void_based_on_strongly_typed_two_parameter_function()
150 final IMethods target = mock(IMethods.class); in can_return_based_on_strongly_typed_three_parameter_function()
165 final IMethods target = mock(IMethods.class); in will_execute_a_void_based_on_strongly_typed_three_parameter_function()
183 final IMethods target = mock(IMethods.class); in can_return_based_on_strongly_typed_four_parameter_function()
199 final IMethods target = mock(IMethods.class); in will_execute_a_void_based_on_strongly_typed_four_parameter_function()
218 final IMethods target = mock(IMethods.class); in can_return_based_on_strongly_typed_five_parameter_function()
233 final IMethods target = mock(IMethods.class); in will_execute_a_void_based_on_strongly_typed_five_parameter_function()
DSmartNullsStubbingTest.java13 import org.mockitousage.IMethods;
23 private IMethods mock;
27 mock = mock(IMethods.class, Mockito.RETURNS_SMART_NULLS); in setup()
30 public IMethods unstubbedMethodInvokedHere(IMethods mock) { in unstubbedMethodInvokedHere()
36 IMethods methods = unstubbedMethodInvokedHere(mock); in shouldSmartNPEPointToUnstubbedCall()
88 IMethods mock = mock(IMethods.class, RETURNS_SMART_NULLS); in shouldReturnOrdinaryEmptyValuesForOrdinaryTypes()
DStrictStubbingEndToEndTest.java19 import org.mockitousage.IMethods;
82 @Mock IMethods mock;
96 @Mock IMethods mock;
110 @Mock IMethods mock;
124 @Mock IMethods mock = Mockito.mock(IMethods.class);
137 @Mock IMethods mock = Mockito.mock(IMethods.class);
150 @Mock IMethods mock;
/external/mockito/src/test/java/org/mockitousage/annotation/
DAnnotationsTest.java15 import org.mockitousage.IMethods;
77 @Mock(answer = Answers.RETURNS_MOCKS, name = "i have a name") IMethods namedAndReturningMocks;
78 @Mock(answer = Answers.RETURNS_DEFAULTS) IMethods returningDefaults;
79 @Mock(extraInterfaces = {List.class}) IMethods hasExtraInterfaces;
80 @Mock() IMethods noExtraConfig;
81 @Mock(stubOnly=true) IMethods stubOnly;
98 @Mock private IMethods mock;
100 public IMethods getSuperBaseMock() { in getSuperBaseMock()
106 @Mock private IMethods mock;
108 public IMethods getBaseMock() { in getBaseMock()
[all …]
DCaptorAnnotationTest.java11 import org.mockitousage.IMethods;
125 private ArgumentCaptor<IMethods> mock;
127 public ArgumentCaptor<IMethods> getSuperBaseCaptor() { in getSuperBaseCaptor()
134 private ArgumentCaptor<IMethods> mock;
136 public ArgumentCaptor<IMethods> getBaseCaptor() { in getBaseCaptor()
143 private ArgumentCaptor<IMethods> mock;
145 public ArgumentCaptor<IMethods> getCaptor() { in getCaptor()
/external/mockito/src/test/java/org/mockito/internal/exceptions/
DReporterTest.java17 import org.mockitousage.IMethods;
39 …nvocation_with_bogus_default_answer = new InvocationBuilder().mock(mock(IMethods.class, new Return… in can_use_mock_name_even_when_mock_bogus_default_answer_and_when_reporting_no_more_interaction_wanted()
45 …nvocation_with_bogus_default_answer = new InvocationBuilder().mock(mock(IMethods.class, new Return… in can_use_print_mock_name_even_when_mock_bogus_default_answer_and_when_reporting_no_more_interaction_wanted_in_order()
51 …nvocation_with_bogus_default_answer = new InvocationBuilder().mock(mock(IMethods.class, new Return… in can_use_print_mock_name_even_when_mock_bogus_default_answer_and_when_reporting_invalid_argument_position()
57 …nvocation_with_bogus_default_answer = new InvocationBuilder().mock(mock(IMethods.class, new Return… in can_use_print_mock_name_even_when_mock_bogus_default_answer_and_when_reporting_wrong_argument_to_return()
64 IMethods mock_with_bogus_default_answer = mock(IMethods.class, new Returns(false)); in can_use_print_mock_name_even_when_mock_bogus_default_answer_and_when_reporting_delegate_method_dont_exists()
71 IMethods mock_with_bogus_default_answer = mock(IMethods.class, new Returns(false)); in can_use_print_mock_name_even_when_mock_bogus_default_answer_and_when_reporting_delegate_method_has_wrong_return_type()
77 IMethods mock_with_bogus_default_answer = mock(IMethods.class, new Returns(false)); in can_use_print_mock_name_even_when_mock_bogus_default_answer_and_when_reporting_injection_failure()
/external/mockito/src/test/java/org/mockito/internal/
DInvalidStateDetectionTest.java15 import org.mockitousage.IMethods;
42 @Mock private IMethods mock;
170 void detect(IMethods mock); in detect()
175 public void detect(IMethods mock) { in detect()
182 public void detect(IMethods mock) { in detect()
189 public void detect(IMethods mock) { in detect()
196 public void detect(IMethods mock) { in detect()
203 public void detect(IMethods mock) { in detect()
210 public void detect(IMethods mock) { in detect()
216 public void detect(IMethods mock) { in detect()
[all …]
/external/mockito/src/test/java/org/mockitousage/stacktrace/
DModellingDescriptiveMessagesTest.java16 import org.mockitousage.IMethods;
28 @Mock private IMethods mock;
134 mock = mock(IMethods.class, RETURNS_SMART_NULLS); in shouldSayUnstubbedMethodWasInvokedHere()
136 IMethods m = mock.iMethodsReturningMethod(); in shouldSayUnstubbedMethodWasInvokedHere()
175 mock(IMethods.class, withSettings().extraInterfaces(List.class, null)); in shouldScreamWhenNullPassedInsteadOfAnInterface()
181 mock(IMethods.class, withSettings().extraInterfaces(LinkedList.class)); in shouldScreamWhenNonInterfacePassed()
187 mock(IMethods.class, withSettings().extraInterfaces(IMethods.class)); in shouldScreamWhenExtraIsTheSame()
193 mock(IMethods.class, withSettings().extraInterfaces()); in shouldScreamWhenExtraInterfacesEmpty()
199 mock(IMethods.class, withSettings().extraInterfaces((Class<?>[]) null)); in shouldScreamWhenExtraInterfacesIsANullArray()
/external/mockito/src/test/java/org/mockitousage/session/
DMockitoSessionTest.java16 import org.mockitousage.IMethods;
102 @Mock IMethods mock;
118 @Mock IMethods mock;
132 @Mock IMethods mock;
146 @Mock IMethods mock;
161 @Mock IMethods mock;
177 @Mock IMethods mock;
178 IMethods mock2 = Mockito.mock(IMethods.class, "manual mock");
193 @Mock IMethods mock;
212 @Mock IMethods mock;
/external/mockito/src/test/java/org/mockitousage/verification/
DVerificationInOrderTest.java13 import org.mockitousage.IMethods;
22 private IMethods mockOne;
23 private IMethods mockTwo;
24 private IMethods mockThree;
29 mockOne = mock(IMethods.class); in setUp()
30 mockTwo = mock(IMethods.class); in setUp()
31 mockThree = mock(IMethods.class); in setUp()
38 mockOne = mock(IMethods.class); in shouldVerifySingleMockInOrderAndNotInOrder()
DVerificationInOrderMixedWithOrdiraryVerificationTest.java14 import org.mockitousage.IMethods;
22 private IMethods mockOne;
23 private IMethods mockTwo;
24 private IMethods mockThree;
29 mockOne = mock(IMethods.class); in setUp()
30 mockTwo = mock(IMethods.class); in setUp()
31 mockThree = mock(IMethods.class); in setUp()
129 mockOne = mock(IMethods.class); in shouldUseEqualsToVerifyMethodArguments()
148 mockOne = mock(IMethods.class); in shouldUseEqualsToVerifyMethodVarargs()
/external/mockito/src/test/java/org/mockitousage/matchers/
DVerificationAndStubbingUsingMatchersTest.java11 import org.mockitousage.IMethods;
19 private IMethods one;
20 private IMethods two;
21 private IMethods three;
25 one = mock(IMethods.class); in setUp()
26 two = mock(IMethods.class); in setUp()
27 three = mock(IMethods.class); in setUp()
/external/mockito/src/test/java/org/mockitousage/bugs/
DStubbingMocksThatAreConfiguredToReturnMocksTest.java9 import org.mockitousage.IMethods;
19 IMethods mock = mock(IMethods.class, RETURNS_MOCKS); in shouldAllowStubbingMocksConfiguredWithRETURNS_MOCKS()
25 IMethods mock = mock(IMethods.class, RETURNS_MOCKS); in shouldAllowStubbingMocksConfiguredWithRETURNS_MOCKSWithDoApi()
/external/mockito/src/test/java/org/mockitousage/performance/
DLoadsOfMocksTest.java10 import org.mockitousage.IMethods;
24 List<IMethods> mocks = new LinkedList<IMethods>(); in testSomething()
27 IMethods mock = mock(IMethods.class); in testSomething()

123456