Searched refs:given (Results 1 - 25 of 157) sorted by relevance

1234567

/external/snakeyaml/src/test/java/org/yaml/snakeyaml/
H A DPerson.java19 public String given; field in class:Person
/external/mockito/src/test/java/org/mockitousage/
H A DCompilationWarningsTest.java47 willReturn(null).given(mock(IMethods.class)).objectReturningMethodNoArgs();
48 willReturn("a", 12).given(mock(IMethods.class)).objectReturningMethodNoArgs();
49 willReturn(1000).given(mock(IMethods.class)).objectReturningMethodNoArgs();
50 willThrow(new NullPointerException()).given(mock(IMethods.class)).objectReturningMethodNoArgs();
51 willThrow(new NullPointerException(), new IllegalArgumentException()).given(mock(IMethods.class)).objectReturningMethodNoArgs();
52 willThrow(NullPointerException.class).given(mock(IMethods.class)).objectReturningMethodNoArgs();
54 willAnswer(ignore()).willReturn(null).given(mock(IMethods.class)).objectReturningMethodNoArgs();
55 willAnswer(ignore()).willReturn("a", 12).given(mock(IMethods.class)).objectReturningMethodNoArgs();
56 willAnswer(ignore()).willReturn(1000).given(mock(IMethods.class)).objectReturningMethodNoArgs();
57 willAnswer(ignore()).willThrow(new NullPointerException()).given(moc
[all...]
H A DPlaygroundWithDemoOfUnclonedParametersProblemTest.java19 import static org.mockito.BDDMockito.given;
39 //given
46 given(importLogDao.anyImportRunningOrRunnedToday(importType, currentDate)).willReturn(false);
47 willAnswer(byCheckingLogEquals(initialLog)).given(importLogDao).include(any(ImportLogBean.class));
58 //given
65 given(importLogDao.anyImportRunningOrRunnedToday(importType, currentDate)).willReturn(false);
66 willAnswer(byCheckingLogEquals(finalLog)).given(importLogDao).alter(any(ImportLogBean.class));
/external/mockito/src/test/java/org/mockitousage/stubbing/
H A DStubbingWarningsTest.java12 import static org.mockito.BDDMockito.given;
34 given(mock.simpleMethod(100)).willReturn("100");
44 given(mock.simpleMethod(100)).willReturn("100");
55 given(mock.simpleMethod(100)).willReturn("100");
61 //because it was simpler to implement. This can be improved given we put priority to improve the warnings.
71 given(mock.simpleMethod(100)).willReturn("100");
H A DStrictStubbingEndToEndTest.java20 import static org.mockito.BDDMockito.given;
86 given(mock.simpleMethod("1")).willReturn("one");
100 given(mock.simpleMethod(1)).willReturn("");
114 given(mock.simpleMethod(1)).willReturn("");
123 given(mock.simpleMethod(1)).willReturn("");
127 given(mock.simpleMethod(2)).willReturn("");
136 given(mock.simpleMethod(1)).willReturn("");
140 given(mock.simpleMethod(2)).willReturn("");
150 given(mock.simpleMethod("1")).willReturn("one");
154 given(moc
[all...]
H A DStrictStubbingTest.java14 import static org.mockito.BDDMockito.given;
53 given(mock.simpleMethod(100)).willReturn("100");
62 given(mock.simpleMethod(100)).willReturn("100");
76 given(mock.simpleMethod(100)).willReturn("100");
88 given(mock.simpleMethod(100)).willReturn("100");
H A DStubbingWithAdditionalAnswersTest.java20 import static org.mockito.BDDMockito.given;
47 given(iMethods.objectArgMethod(anyObject())).will(returnsFirstArg());
48 given(iMethods.threeArgumentMethod(eq(0), anyObject(), anyString())).will(returnsSecondArg());
49 given(iMethods.threeArgumentMethod(eq(1), anyObject(), anyString())).will(returnsLastArg());
58 given(iMethods.varargsObject(eq(1), anyVararg())).will(returnsArgAt(3));
65 given(iMethods.toIntPrimitive(anyInt())).will(returnsFirstArg());
66 given(iMethods.toIntWrapper(anyInt())).will(returnsFirstArg());
74 given(iMethods.simpleMethod(anyString()))
88 given(iMethods.simpleMethod(anyString()))
104 given(iMethod
[all...]
/external/mockito/src/test/java/org/mockitousage/junitrule/
H A DStrictJUnitRuleTest.java16 import static org.mockito.BDDMockito.given;
34 given(mock.simpleMethod(10)).willReturn("foo");
39 given(mock.simpleMethod(10)).willReturn("foo");
49 given(mock.simpleMethod(10)).willReturn("foo");
58 given(mock.simpleMethod(10)).willReturn("foo");
93 " - stubbing the same method multiple times using 'given().will()' or 'when().then()' API\n" +
94 " Please use 'will().given()' or 'doReturn().when()' API for stubbing.\n" +
103 willReturn("10").given(mock).simpleMethod(10) ; //used
104 willReturn("20").given(mock).simpleMethod(20) ; //unused
105 willReturn("30").given(moc
[all...]
/external/mockito/src/test/java/org/mockitousage/customization/
H A DBDDMockitoTest.java33 given(mock.simpleMethod("foo")).willReturn("bar");
41 given(mock.simpleMethod("foo")).willThrow(new SomethingWasWrong());
52 given(mock.simpleMethod("foo")).willThrow(SomethingWasWrong.class);
65 given(mock.simpleMethod("foo")).willThrow(SomethingWasWrong.class, AnotherThingWasWrong.class);
76 given(mock.simpleMethod(anyString())).willAnswer(new Answer<String>() {
87 given(mock.simpleMethod(anyString())).will(new Answer<String>() {
98 given(mock.simpleMethod(anyString()))
108 given(mock.objectReturningMethodNoArgs())
121 .given(mock).simpleMethod();
129 willThrow(new SomethingWasWrong()).given(moc
[all...]
/external/vboot_reference/scripts/keygeneration/
H A Dmake_keyblock.sh6 # Generates a keyblock containing a public key and signed using the given
17 <in_signing_key>.vbprivk with the given keyblock <flags>.
/external/compiler-rt/make/
H A Dutil.mk33 # Set the given make variable to the given value.
38 # Append the given value to the given make variable.
43 # Check whether the given variable is defined.
48 # Check whether the given variable is undefined.
53 # Get the value of the given make variable, or the default-value if the variable
80 # Check that a value is true, or give an error including the given message
93 # Check that all command line variables are in the given list. This routine is
/external/mockito/src/test/java/org/mockito/internal/handler/
H A DInvocationNotifierHandlerTest.java27 import static org.mockito.BDDMockito.given;
62 // given
63 given(mockHandler.handle(invocation)).willReturn("returned value");
75 // given
77 given(mockHandler.handle(invocation)).willReturn(computedException);
89 // given
91 given(mockHandler.handle(invocation)).willThrow(parseException);
106 willThrow(new NullPointerException()).given(customListener).reportInvocation(any(MethodInvocationReport.class));
H A DMockHandlerImplTest.java32 import static org.mockito.BDDMockito.given;
46 // given
72 // given
85 given(mockSettings.getDefaultAnswer()).willReturn(new Returns(AWrongType.WRONG_TYPE));
106 given(handler.invocationContainerImpl.findAnswerFor(any(InvocationImpl.class))).willReturn(value);
114 given(handler.getMockSettings().getInvocationListeners()).willReturn(Arrays.asList(listener));
/external/mockito/src/test/java/org/mockito/internal/util/reflection/
H A DParameterizedConstructorInstantiatorTest.java28 import static org.mockito.BDDMockito.given;
73 given(resolver.resolveTypeInstances(Matchers.<Class<?>[]>anyVararg())).willReturn(new Object[]{ observer, map });
86 given(resolver.resolveTypeInstances(Matchers.<Class<?>[]>anyVararg())).willReturn(new Object[]{ observer, wrongArg });
98 given(resolver.resolveTypeInstances(Matchers.<Class<?>[]>anyVararg())).willReturn(new Object[]{ null });
111 given(resolver.resolveTypeInstances(Matchers.<Class<?>[]>anyVararg())).willReturn(new Object[]{ "", vararg});
H A DFieldInitializerTest.java17 import static org.mockito.BDDMockito.given;
160 ConstructorArgumentResolver resolver = given(mock(ConstructorArgumentResolver.class).resolveTypeInstances(any(Class.class)))
/external/mockito/src/test/java/org/mockitousage/debugging/
H A DInvocationListenerCallbackTest.java16 import static org.mockito.BDDMockito.given;
29 // given
32 willReturn("basil").given(foo).giveMeSomeString("herb");
43 // given
47 given(foo.giveMeSomeString("herb")).willReturn("rosemary");
59 // given
H A DVerboseLoggingOfInvocationsOnMockTest.java20 import static org.mockito.BDDMockito.given;
54 // given
70 // given
86 // given
88 given(foo.giveMeSomeString("Klipsch")).willReturn("earbuds");
104 // given
125 // given
143 // given
145 given(foo.giveMeSomeString("Apple")).willReturn(
/external/curl/tests/libtest/
H A Dlib552.c132 size_t given = amount < available ? amount : available; /* What is given */ local
134 memcpy(ptr, databuf + current_offset, given);
135 current_offset += given;
136 return given;
/external/swiftshader/third_party/LLVM/bindings/ocaml/bitwriter/
H A Dllvm_bitwriter.ml16 (* Writes the bitcode for module the given path. Returns true if successful. *)
/external/protobuf/
H A Dconfigure.ac52 [use the given protoc command instead of building a new one when building tests (useful for cross-compiling)])],
120 AC_MSG_FAILURE([--with-zlib was given, but no working zlib library was found])
127 AC_MSG_FAILURE([--with-zlib was given, but zlib headers were not present or were too old (requires 1.2.0.4)])
136 # No argument given. Use system protoc.
144 # is a nested package and --with-protoc was actually given on the outer
/external/protobuf/util/
H A Dconfigure.ac52 [use the given protoc command instead of building a new one when building tests (useful for cross-compiling)])],
120 AC_MSG_FAILURE([--with-zlib was given, but no working zlib library was found])
127 AC_MSG_FAILURE([--with-zlib was given, but zlib headers were not present or were too old (requires 1.2.0.4)])
136 # No argument given. Use system protoc.
144 # is a nested package and --with-protoc was actually given on the outer
/external/javasqlite/src/main/java/SQLite/
H A DStringEncoder.java24 * Encodes the given byte array into a string that can be used by
95 * Decodes the given string that is assumed to be a valid encoding
96 * of a byte array. Typically the given string is generated by
98 * @param s the given string encoding.
100 * @throws IllegalArgumentException when the string given is not
199 * index offset, to the given target.
222 * Encodes the given byte array into SQLite3 blob notation, ie X'..'
/external/ltp/testcases/kernel/fs/racer/
H A Dfs_racer.sh73 echo usage: fs_racer.sh -t DURATION [Execute the testsuite for given DURATION seconds]
/external/libcap-ng/libcap-ng-0.7/
H A Dpy-compile100 usage_error "no files given"
103 # if basedir was given, then it should be prepended to filenames before
111 # if destdir was given, then it needs to be prepended to the filename to
/external/mockito/src/main/java/org/mockito/
H A DBDDMockito.java13 * Behavior Driven Development style of writing tests uses <b>//given //when //then</b> comments as fundamental parts of your test methods.
18 * The problem is that current stubbing api with canonical role of <b>when</b> word does not integrate nicely with <b>//given //when //then</b> comments.
19 * It's because stubbing belongs to <b>given</b> component of the test and not to the <b>when</b> component of the test.
20 * Hence {@link BDDMockito} class introduces an alias so that you stub method calls with {@link BDDMockito#given(Object)} method.
21 * Now it really nicely integrates with the <b>given</b> component of a BDD style test!
31 * //given
32 * given(seller.askForBread()).willReturn(new Bread());
44 * //given
45 * willThrow(new RuntimeException("boo")).given(mock).foo();
196 public static <T> BDDMyOngoingStubbing<T> given( method in class:BDDMockito
397 <T> T given(T mock); method in interface:BDDMockito.BDDStubber
408 public <T> T given(T mock) { method in class:BDDMockito.BDDStubberImpl
[all...]

Completed in 605 milliseconds

1234567