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((double) 1), eq((double) 1)))).thenReturn("3"); in and_overloaded()
74 when(mock.oneArg(and(eq((float) 1), eq((float) 1)))).thenReturn("4"); in and_overloaded()
75 when(mock.oneArg(and(eq((int) 1), eq((int) 1)))).thenReturn("5"); in and_overloaded()
76 when(mock.oneArg(and(eq((long) 1), eq((long) 1)))).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 …]
DVerificationWithTimeoutTest.java64 verify(mock, timeout(100)).oneArg('c'); in shouldVerifyWithTimeout()
65 verify(mock, timeout(100).atLeastOnce()).oneArg('c'); in shouldVerifyWithTimeout()
66 verify(mock, timeout(100).times(1)).oneArg('c'); in shouldVerifyWithTimeout()
67 verify(mock).oneArg('c'); in shouldVerifyWithTimeout()
68 verify(mock, times(1)).oneArg('c'); in shouldVerifyWithTimeout()
77 verify(mock, never()).oneArg('c'); in shouldFailVerificationWithTimeout()
79 verify(mock, timeout(20).atLeastOnce()).oneArg('c'); in shouldFailVerificationWithTimeout()
89 verify(mock, timeout(100).atLeast(1)).oneArg('c'); in shouldAllowMixingOtherModesWithTimeout()
90 verify(mock, timeout(100).times(2)).oneArg('c'); in shouldAllowMixingOtherModesWithTimeout()
101 verify(mock, timeout(100).atLeast(1)).oneArg('c'); in shouldAllowMixingOtherModesWithTimeoutAndFail()
[all …]
DVerificationAfterDelayTest.java56 mock.oneArg('1');
77 verify(mock, after(100).times(1)).oneArg('1'); in shouldVerifyNormallyWithSpecificTimes()
86 verify(mock, after(100).atLeast(1)).oneArg('1'); in shouldVerifyNormallyWithAtLeast()
95 verify(mock, times(0)).oneArg('1'); in shouldFailVerificationWithWrongTimes()
97 verify(mock, after(100).times(2)).oneArg('1'); in shouldFailVerificationWithWrongTimes()
109 verify(mock, after(100).atLeast(2)).oneArg('1'); in shouldWaitTheFullTimeIfTheTestCouldPass()
124 verify(mock, after(10000).never()).oneArg('1'); in shouldStopEarlyIfTestIsDefinitelyFailed()
140 verify(mock, after(200).atMost(n)).oneArg((char) captor.capture()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInAtMostVerification()
155 verify(mock, after(200).times(n)).oneArg((char) captor.capture()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInTimesVerification()
171 verify(mock, after(200).atLeast(n)).oneArg((char) captor.capture()); in shouldReturnListOfArgumentsWithSameSizeAsGivenInAtLeastVerification()
[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()
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.java53 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg()
55 assertThat(mock.oneArg(null)).describedAs("Most generic method chosen for matcher " + in with_single_arg()
65 when(mock.oneArg((String) isNull())).thenReturn("ok"); in with_single_arg_and_matcher_cast()
67 …assertThat(mock.oneArg(null)).describedAs("Most specific method enforced for matcher via cast").is… in with_single_arg_and_matcher_cast()
74 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg_and_null_Object_reference()
77 …assertThat(mock.oneArg(arg)).describedAs("Most generic method chosen for matcher").isEqualTo("ok"); in with_single_arg_and_null_Object_reference()
187 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg()
189 …assertThat(mock.oneArg(null)).describedAs("Most specific method chosen for matcher and for null").… in with_single_arg()
196 when(mock.oneArg(isNull())).thenReturn("ok"); in with_single_arg_and_null_Object_reference()
199 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()
79 verify(mock).oneArg(true); in shouldFilterStacktraceOnMockitoException()
89 mock.oneArg(true); in shouldFilterStacktraceWhenVerifyingInOrder()
90 mock.oneArg(false); in shouldFilterStacktraceWhenVerifyingInOrder()
92 inOrder.verify(mock).oneArg(false); in shouldFilterStacktraceWhenVerifyingInOrder()
94 inOrder.verify(mock).oneArg(true); in shouldFilterStacktraceWhenVerifyingInOrder()
125 when(mock.oneArg(true)).thenThrow(new Exception()); in shouldFilterStackTraceWhenThrowingExceptionFromMockHandler()
/external/xmlrpcpp/test/
DHelloClient.cpp26 XmlRpcValue oneArg; in main() local
27 oneArg[0] = "Hello"; in main()
28 if (c.execute("system.methodHelp", oneArg, result)) in main()
40 oneArg[0] = "Chris"; in main()
41 if (c.execute("HelloName", oneArg, result)) in main()
/external/mockito/src/test/java/org/mockitousage/bugs/
DArgumentCaptorDontCapturePreviouslyVerifiedTest.java17 mock.oneArg("first"); in previous_verified_invocation_should_still_capture_args()
19 verify(mock, times(1)).oneArg(argument.capture()); in previous_verified_invocation_should_still_capture_args()
23 mock.oneArg("second"); in previous_verified_invocation_should_still_capture_args()
25 verify(mock, times(2)).oneArg(argument.capture()); in previous_verified_invocation_should_still_capture_args()
/external/mockito/src/test/java/org/mockito/internal/
DInvalidStateDetectionTest.java141 doThrow(new RuntimeException()).when(mock).oneArg(true); in shouldCorrectStateAfterDetectingUnfinishedStubbing()
145 doThrow(new RuntimeException()).when(mock).oneArg(true); in shouldCorrectStateAfterDetectingUnfinishedStubbing()
147 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