Home
last modified time | relevance | path

Searched refs:oneArg (Results 1 – 22 of 22) sorted by relevance

/external/mockito/src/test/java/org/mockitousage/matchers/
DMatchersTest.java70 when(mock.oneArg(and(eq(false), eq(false)))).thenReturn("0"); in and_overloaded()
71 when(mock.oneArg(and(eq((byte) 1), eq((byte) 1)))).thenReturn("1"); in and_overloaded()
72 when(mock.oneArg(and(eq('a'), eq('a')))).thenReturn("2"); in and_overloaded()
73 when(mock.oneArg(and(eq(1D), eq(1D)))).thenReturn("3"); in and_overloaded()
74 when(mock.oneArg(and(eq(1F), eq(1F)))).thenReturn("4"); in and_overloaded()
75 when(mock.oneArg(and(eq(1), eq(1)))).thenReturn("5"); in and_overloaded()
76 when(mock.oneArg(and(eq(1L), eq(1L)))).thenReturn("6"); in and_overloaded()
77 when(mock.oneArg(and(eq((short) 1), eq((short) 1)))).thenReturn("7"); in and_overloaded()
78 when(mock.oneArg(and(contains("a"), contains("d")))).thenReturn("8"); in and_overloaded()
79 when(mock.oneArg(and(isA(Class.class), eq(Object.class)))).thenReturn("9"); in and_overloaded()
[all …]
DCustomMatchersTest.java57 when(mock.oneArg(booleanThat(new IsAnyBoolean()))).thenReturn("foo"); in shouldUseCustomBooleanMatcher()
59 assertEquals("foo", mock.oneArg(true)); in shouldUseCustomBooleanMatcher()
60 assertEquals("foo", mock.oneArg(false)); in shouldUseCustomBooleanMatcher()
62 assertEquals(null, mock.oneArg("x")); in shouldUseCustomBooleanMatcher()
67 when(mock.oneArg(charThat(new IsSorZ()))).thenReturn("foo"); in shouldUseCustomCharMatcher()
69 assertEquals("foo", mock.oneArg('s')); in shouldUseCustomCharMatcher()
70 assertEquals("foo", mock.oneArg('z')); in shouldUseCustomCharMatcher()
71 assertEquals(null, mock.oneArg('x')); in shouldUseCustomCharMatcher()
96 when(mock.oneArg(byteThat(new IsZeroOrOne<Byte>()))).thenReturn("byte"); in shouldUseCustomPrimitiveNumberMatchers()
97 when(mock.oneArg(shortThat(new IsZeroOrOne<Short>()))).thenReturn("short"); in shouldUseCustomPrimitiveNumberMatchers()
[all …]
DHamcrestMatchersTest.java74 mock.oneArg(true); in supports_primitive_matchers_from_core_library()
75 mock.oneArg((byte) 1); in supports_primitive_matchers_from_core_library()
76 mock.oneArg(2); in supports_primitive_matchers_from_core_library()
77 mock.oneArg(3L); in supports_primitive_matchers_from_core_library()
78 mock.oneArg('4'); in supports_primitive_matchers_from_core_library()
79 mock.oneArg(5.0D); in supports_primitive_matchers_from_core_library()
80 mock.oneArg(6.0F); in supports_primitive_matchers_from_core_library()
82 verify(mock).oneArg(booleanThat(is(true))); in supports_primitive_matchers_from_core_library()
83 verify(mock).oneArg(byteThat(is((byte) 1))); in supports_primitive_matchers_from_core_library()
84 verify(mock).oneArg(intThat(is(2))); in supports_primitive_matchers_from_core_library()
[all …]
DAnyXMatchersAcceptNullsTest.java29 when(mock.oneArg((Object) any())).thenReturn("matched"); in shouldAcceptNullsInAnyMatcher()
36 when(mock.oneArg((Object) anyObject())).thenReturn("matched"); in shouldAcceptNullsInAnyObjectMatcher()
43 when(mock.oneArg(anyString())).thenReturn("0"); in shouldNotAcceptNullInAnyXMatchers()
49 assertEquals(null, mock.oneArg((Object) null)); in shouldNotAcceptNullInAnyXMatchers()
50 assertEquals(null, mock.oneArg((String) null)); in shouldNotAcceptNullInAnyXMatchers()
DVerificationAndStubbingUsingMatchersTest.java53 doThrow(new RuntimeException()).when(one).oneArg(true); in shouldVerifyUsingMatchers()
57 one.oneArg(true); in shouldVerifyUsingMatchers()
67 verify(one).oneArg(eq(true)); in shouldVerifyUsingMatchers()
DInvalidUseOfMatchersTest.java46 mock.oneArg(true); in should_detect_stupid_use_of_matchers_when_verifying()
50 Mockito.verify(mock).oneArg(true); in should_detect_stupid_use_of_matchers_when_verifying()
/external/mockito/src/test/java/org/mockitousage/verification/
DVerificationInOrderWithCallsTest.java30 mockOne.oneArg( 1 ); in shouldFailWhenMethodNotCalled()
32 verifier.verify( mockOne, calls(1)).oneArg( 1 ); in shouldFailWhenMethodNotCalled()
40 verifier.verify( mockOne, calls(1)).oneArg( 2 ); in shouldFailWhenMethodNotCalled()
48 mockOne.oneArg( 1 ); in shouldFailWhenMethodCalledTooFewTimes()
49 mockOne.oneArg( 2 ); in shouldFailWhenMethodCalledTooFewTimes()
52 verifier.verify( mockOne, calls(1)).oneArg( 1 ); in shouldFailWhenMethodCalledTooFewTimes()
61 verifier.verify( mockOne, calls(2)).oneArg( 2 ); in shouldFailWhenMethodCalledTooFewTimes()
69 mockOne.oneArg( 1 ); in shouldFailWhenSingleMethodCallsAreOutOfSequence()
70 mockOne.oneArg( 2 ); in shouldFailWhenSingleMethodCallsAreOutOfSequence()
73 verifier.verify( mockOne, calls(1)).oneArg( 2 ); in shouldFailWhenSingleMethodCallsAreOutOfSequence()
[all …]
DVerificationWithAfterTest.java38 mock.oneArg('1');
56 verify(mock, after(300)).oneArg('1'); in should_verify_with_after()
69 verify(mock, after(300)).oneArg('1'); in should_verify_with_after_and_fail()
82 verify(mock, after(300).times(2)).oneArg('1'); in should_verify_with_time_x()
96 verify(mock, after(300).times(2)).oneArg('1'); in should_verify_with_time_x_and_fail()
108 verify(mock, after(300).atLeastOnce()).oneArg('1'); in should_verify_with_at_least()
122 verify(mock, after(300).atLeast(3)).oneArg('1'); in should_verify_with_at_least_and_fail()
135 verify(mock, after(300).atMost(2)).oneArg('1'); in should_verify_with_at_most()
149 verify(mock, after(300).atMost(1)).oneArg('1'); in should_verify_with_at_most_and_fail()
160 verify(mock, after(50).never()).oneArg('1'); in should_verify_with_never()
[all …]
DVerificationWithTimeoutTest.java57 verify(mock, timeout(200).only()).oneArg('c'); in should_verify_with_timeout()
58 verify(mock).oneArg('c'); //sanity check in should_verify_with_timeout()
70 verify(mock, timeout(50).only()).oneArg('c'); in should_verify_with_timeout_and_fail()
89 verify(mock, timeout(2000)).oneArg('c'); in should_verify_with_timeout_and_fail_early()
104 verify(mock, timeout(300).times(2)).oneArg('c'); in should_verify_with_times_x()
117 verify(mock, timeout(100).times(2)).oneArg('c'); in should_verify_with_times_x_and_fail()
129 verify(mock, timeout(200).atLeast(2)).oneArg('c'); in should_verify_with_at_least()
139 verify(mock, timeout(200).atLeastOnce()).oneArg('c'); in should_verify_with_at_least_once()
151 verify(mock, timeout(100).atLeast(3)).oneArg('c'); in should_verify_with_at_least_and_fail()
163 verify(mock, timeout(100).only()).oneArg('c'); in should_verify_with_only()
[all …]
DVerificationUsingMatchersTest.java53 mock.oneArg(one); in shouldVerifyUsingSameMatcher()
54 mock.oneArg(two); in shouldVerifyUsingSameMatcher()
56 verify(mock).oneArg(same(one)); in shouldVerifyUsingSameMatcher()
57 verify(mock, times(2)).oneArg(two); in shouldVerifyUsingSameMatcher()
60 verify(mock).oneArg(same(three)); in shouldVerifyUsingSameMatcher()
DVerificationWithAfterAndCaptorTest.java50 verify(mock, after(200).atMost(n)).oneArg((char) captor.capture()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInAtMostVerification()
66 verify(mock, after(200).times(n)).oneArg((char) captor.capture()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInTimesVerification()
83 verify(mock, after(200).atLeast(n)).oneArg((char) captor.capture()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInAtLeastVerification()
92 mock.oneArg((char) ('0' + i)); in exerciseMockNTimes()
DBasicVerificationInOrderTest.java67 inOrder.verify(mockOne, times(0)).oneArg(false); in shouldVerifyInOrderWhenExpectingSomeInvocationsToBeCalledZeroTimes()
74 inOrder.verify(mockThree, times(0)).oneArg(false); in shouldVerifyInOrderWhenExpectingSomeInvocationsToBeCalledZeroTimes()
167 inOrder.verify(mockOne).oneArg(true); in shouldFailOnFirstMethodBecauseDifferentMethodWanted()
184 inOrder.verify(mockTwo, times(2)).oneArg(true); in shouldFailOnSecondMethodBecauseDifferentMethodWanted()
210 inOrder.verify(mockOne).oneArg(false); in shouldFailOnLastMethodBecauseDifferentMethodWanted()
DDescriptiveMessagesWhenVerificationFailsTest.java161 mock.oneArg(true); in should_print_first_unexpected_invocation()
162 mock.oneArg(false); in should_print_first_unexpected_invocation()
165 verify(mock).oneArg(true); in should_print_first_unexpected_invocation()
/external/mockito/src/test/java/org/mockitousage/
DIMethods.java49 String oneArg(boolean value); in oneArg() method
51 String oneArg(Boolean value); in oneArg() method
55 String oneArg(byte value); in oneArg() method
57 String oneArg(Byte value); in oneArg() method
61 String oneArg(short value); in oneArg() method
63 String oneArg(Short value); in oneArg() method
67 String oneArg(char value); in oneArg() method
69 String oneArg(Character value); in oneArg() method
73 String oneArg(int value); in oneArg() method
75 String oneArg(Integer value); in oneArg() method
[all …]
DMethodsImpl.java84 public String oneArg(boolean value) { in oneArg() method in MethodsImpl
88 public String oneArg(Boolean value) { in oneArg() method in MethodsImpl
96 public String oneArg(byte value) { in oneArg() method in MethodsImpl
100 public String oneArg(Byte value) { in oneArg() method in MethodsImpl
108 public String oneArg(short value) { in oneArg() method in MethodsImpl
112 public String oneArg(Short value) { in oneArg() method in MethodsImpl
120 public String oneArg(char value) { in oneArg() method in MethodsImpl
124 public String oneArg(Character value) { in oneArg() method in MethodsImpl
132 public String oneArg(int value) { in oneArg() method in MethodsImpl
136 public String oneArg(Integer value) { in oneArg() method in MethodsImpl
[all …]
/external/mockito/src/test/java/org/mockitousage/jls/
DJLS_15_12_2_5Test.java57 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg()
59 assertThat(mock.oneArg(null)).describedAs("Most generic method chosen for matcher " + in with_single_arg()
69 when(mock.oneArg((String) isNull())).thenReturn("ok"); in with_single_arg_and_matcher_cast()
71 …assertThat(mock.oneArg(null)).describedAs("Most specific method enforced for matcher via cast").is… in with_single_arg_and_matcher_cast()
78 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg_and_null_Object_reference()
81 …assertThat(mock.oneArg(arg)).describedAs("Most generic method chosen for matcher").isEqualTo("ok"); in with_single_arg_and_null_Object_reference()
191 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg()
193 …assertThat(mock.oneArg(null)).describedAs("Most specific method chosen for matcher and for null").… in with_single_arg()
200 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg_and_null_Object_reference()
203 assertThat(mock.oneArg(arg)).describedAs("not the stubbed method").isEqualTo(null); in with_single_arg_and_null_Object_reference()
[all …]
/external/mockito/src/test/java/org/mockitousage/stacktrace/
DStackTraceFilteringTest.java55 mock.oneArg(true); in shouldFilterStackTraceOnVerifyNoMoreInteractions()
66 mock.oneArg(true); in shouldFilterStackTraceOnVerifyZeroInteractions()
80 verify(mock).oneArg(true); in shouldFilterStacktraceOnMockitoException()
90 mock.oneArg(true); in shouldFilterStacktraceWhenVerifyingInOrder()
91 mock.oneArg(false); in shouldFilterStacktraceWhenVerifyingInOrder()
93 inOrder.verify(mock).oneArg(false); in shouldFilterStacktraceWhenVerifyingInOrder()
95 inOrder.verify(mock).oneArg(true); in shouldFilterStacktraceWhenVerifyingInOrder()
126 when(mock.oneArg(true)).thenThrow(new Exception()); in shouldFilterStackTraceWhenThrowingExceptionFromMockHandler()
/external/mockito/src/test/java/org/mockitousage/bugs/
DArgumentCaptorDontCapturePreviouslyVerifiedTest.java21 mock.oneArg("first"); in previous_verified_invocation_should_still_capture_args()
23 verify(mock, times(1)).oneArg(argument.capture()); in previous_verified_invocation_should_still_capture_args()
27 mock.oneArg("second"); in previous_verified_invocation_should_still_capture_args()
29 verify(mock, times(2)).oneArg(argument.capture()); in previous_verified_invocation_should_still_capture_args()
/external/mockito/src/test/java/org/mockito/internal/
DInvalidStateDetectionTest.java144 doThrow(new RuntimeException()).when(mock).oneArg(true); in shouldCorrectStateAfterDetectingUnfinishedStubbing()
148 doThrow(new RuntimeException()).when(mock).oneArg(true); in shouldCorrectStateAfterDetectingUnfinishedStubbing()
150 mock.oneArg(true); in shouldCorrectStateAfterDetectingUnfinishedStubbing()
/external/clang/test/PCH/
Dobjc_exprs.h10 typedef typeof(@selector(oneArg:)) objc_selector_oneArg;
/external/guava/guava-testlib/test/com/google/common/testing/
DNullPointerTesterTest.java391 public void oneArg(String s) { checkNotNull(s); } in oneArg() method in NullPointerTesterTest.PassObject
428 @Override public void oneArg(String s) { in oneArg() method in NullPointerTesterTest.FailOneArgDoesntThrowNPE
438 @Override public void oneArg(String s) { in oneArg() method in NullPointerTesterTest.FailOneArgThrowsWrongType
626 public void oneArg(String s) {} in oneArg() method in NullPointerTesterTest.BaseClassThatFailsToThrow
664 @Override public void oneArg(@Nullable String s) {} in oneArg() method in NullPointerTesterTest.SubclassThatOverridesBadSuperclassMethod
674 public void oneArg(@Nullable CharSequence s) {} in oneArg() method in NullPointerTesterTest.SubclassOverridesTheWrongMethod
/external/mockito/src/test/java/org/mockito/internal/stubbing/defaultanswers/
DReturnsSmartNullsTest.java35 Foo withArgs(String oneArg, String otherArg); in withArgs() argument