Mercurial > silverbladetech
comparison Stocks/packages/Moq.4.0.10827/lib/NET40/Moq.xml @ 0:e5d46bb6cdb0
Initial commit
author | adminSH stevenhollidge@hotmail.com |
---|---|
date | Mon, 20 Feb 2012 13:52:35 +0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e5d46bb6cdb0 |
---|---|
1 <?xml version="1.0"?> | |
2 <doc> | |
3 <assembly> | |
4 <name>Moq</name> | |
5 </assembly> | |
6 <members> | |
7 <member name="T:Moq.Language.ISetupConditionResult`1"> | |
8 <summary> | |
9 Implements the fluent API. | |
10 </summary> | |
11 </member> | |
12 <member name="M:Moq.Language.ISetupConditionResult`1.Setup(System.Linq.Expressions.Expression{System.Action{`0}})"> | |
13 <summary> | |
14 The expectation will be considered only in the former condition. | |
15 </summary> | |
16 <param name="expression"></param> | |
17 <returns></returns> | |
18 </member> | |
19 <member name="M:Moq.Language.ISetupConditionResult`1.Setup``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"> | |
20 <summary> | |
21 The expectation will be considered only in the former condition. | |
22 </summary> | |
23 <typeparam name="TResult"></typeparam> | |
24 <param name="expression"></param> | |
25 <returns></returns> | |
26 </member> | |
27 <member name="M:Moq.Language.ISetupConditionResult`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"> | |
28 <summary> | |
29 Setups the get. | |
30 </summary> | |
31 <typeparam name="TProperty">The type of the property.</typeparam> | |
32 <param name="expression">The expression.</param> | |
33 <returns></returns> | |
34 </member> | |
35 <member name="M:Moq.Language.ISetupConditionResult`1.SetupSet``1(System.Action{`0})"> | |
36 <summary> | |
37 Setups the set. | |
38 </summary> | |
39 <typeparam name="TProperty">The type of the property.</typeparam> | |
40 <param name="setterExpression">The setter expression.</param> | |
41 <returns></returns> | |
42 </member> | |
43 <member name="M:Moq.Language.ISetupConditionResult`1.SetupSet(System.Action{`0})"> | |
44 <summary> | |
45 Setups the set. | |
46 </summary> | |
47 <param name="setterExpression">The setter expression.</param> | |
48 <returns></returns> | |
49 </member> | |
50 <member name="T:Moq.Language.ICallback"> | |
51 <summary> | |
52 Defines the <c>Callback</c> verb and overloads. | |
53 </summary> | |
54 </member> | |
55 <member name="T:Moq.IHideObjectMembers"> | |
56 <summary> | |
57 Helper interface used to hide the base <see cref="T:System.Object"/> | |
58 members from the fluent API to make it much cleaner | |
59 in Visual Studio intellisense. | |
60 </summary> | |
61 </member> | |
62 <member name="M:Moq.IHideObjectMembers.GetType"> | |
63 <summary/> | |
64 </member> | |
65 <member name="M:Moq.IHideObjectMembers.GetHashCode"> | |
66 <summary/> | |
67 </member> | |
68 <member name="M:Moq.IHideObjectMembers.ToString"> | |
69 <summary/> | |
70 </member> | |
71 <member name="M:Moq.IHideObjectMembers.Equals(System.Object)"> | |
72 <summary/> | |
73 </member> | |
74 <member name="M:Moq.Language.ICallback.Callback(System.Action)"> | |
75 <summary> | |
76 Specifies a callback to invoke when the method is called. | |
77 </summary> | |
78 <param name="action">The callback method to invoke.</param> | |
79 <example> | |
80 The following example specifies a callback to set a boolean | |
81 value that can be used later: | |
82 <code> | |
83 var called = false; | |
84 mock.Setup(x => x.Execute()) | |
85 .Callback(() => called = true); | |
86 </code> | |
87 </example> | |
88 </member> | |
89 <member name="M:Moq.Language.ICallback.Callback``1(System.Action{``0})"> | |
90 <summary> | |
91 Specifies a callback to invoke when the method is called that receives the original arguments. | |
92 </summary> | |
93 <typeparam name="T">The argument type of the invoked method.</typeparam> | |
94 <param name="action">The callback method to invoke.</param> | |
95 <example> | |
96 Invokes the given callback with the concrete invocation argument value. | |
97 <para> | |
98 Notice how the specific string argument is retrieved by simply declaring | |
99 it as part of the lambda expression for the callback: | |
100 </para> | |
101 <code> | |
102 mock.Setup(x => x.Execute(It.IsAny<string>())) | |
103 .Callback((string command) => Console.WriteLine(command)); | |
104 </code> | |
105 </example> | |
106 </member> | |
107 <member name="M:Moq.Language.ICallback.Callback``2(System.Action{``0,``1})"> | |
108 <summary> | |
109 Specifies a callback to invoke when the method is called that receives the original arguments. | |
110 </summary> | |
111 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
112 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
113 <param name="action">The callback method to invoke.</param> | |
114 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
115 <example> | |
116 Invokes the given callback with the concrete invocation arguments values. | |
117 <para> | |
118 Notice how the specific arguments are retrieved by simply declaring | |
119 them as part of the lambda expression for the callback: | |
120 </para> | |
121 <code> | |
122 mock.Setup(x => x.Execute( | |
123 It.IsAny<string>(), | |
124 It.IsAny<string>())) | |
125 .Callback((string arg1, string arg2) => Console.WriteLine(arg1 + arg2)); | |
126 </code> | |
127 </example> | |
128 </member> | |
129 <member name="M:Moq.Language.ICallback.Callback``3(System.Action{``0,``1,``2})"> | |
130 <summary> | |
131 Specifies a callback to invoke when the method is called that receives the original arguments. | |
132 </summary> | |
133 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
134 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
135 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
136 <param name="action">The callback method to invoke.</param> | |
137 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
138 <example> | |
139 Invokes the given callback with the concrete invocation arguments values. | |
140 <para> | |
141 Notice how the specific arguments are retrieved by simply declaring | |
142 them as part of the lambda expression for the callback: | |
143 </para> | |
144 <code> | |
145 mock.Setup(x => x.Execute( | |
146 It.IsAny<string>(), | |
147 It.IsAny<string>(), | |
148 It.IsAny<string>())) | |
149 .Callback((string arg1, string arg2, string arg3) => Console.WriteLine(arg1 + arg2 + arg3)); | |
150 </code> | |
151 </example> | |
152 </member> | |
153 <member name="M:Moq.Language.ICallback.Callback``4(System.Action{``0,``1,``2,``3})"> | |
154 <summary> | |
155 Specifies a callback to invoke when the method is called that receives the original arguments. | |
156 </summary> | |
157 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
158 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
159 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
160 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
161 <param name="action">The callback method to invoke.</param> | |
162 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
163 <example> | |
164 Invokes the given callback with the concrete invocation arguments values. | |
165 <para> | |
166 Notice how the specific arguments are retrieved by simply declaring | |
167 them as part of the lambda expression for the callback: | |
168 </para> | |
169 <code> | |
170 mock.Setup(x => x.Execute( | |
171 It.IsAny<string>(), | |
172 It.IsAny<string>(), | |
173 It.IsAny<string>(), | |
174 It.IsAny<string>())) | |
175 .Callback((string arg1, string arg2, string arg3, string arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); | |
176 </code> | |
177 </example> | |
178 </member> | |
179 <member name="M:Moq.Language.ICallback.Callback``5(System.Action{``0,``1,``2,``3,``4})"> | |
180 <summary> | |
181 Specifies a callback to invoke when the method is called that receives the original arguments. | |
182 </summary> | |
183 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
184 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
185 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
186 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
187 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
188 <param name="action">The callback method to invoke.</param> | |
189 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
190 <example> | |
191 Invokes the given callback with the concrete invocation arguments values. | |
192 <para> | |
193 Notice how the specific arguments are retrieved by simply declaring | |
194 them as part of the lambda expression for the callback: | |
195 </para> | |
196 <code> | |
197 mock.Setup(x => x.Execute( | |
198 It.IsAny<string>(), | |
199 It.IsAny<string>(), | |
200 It.IsAny<string>(), | |
201 It.IsAny<string>(), | |
202 It.IsAny<string>())) | |
203 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5)); | |
204 </code> | |
205 </example> | |
206 </member> | |
207 <member name="M:Moq.Language.ICallback.Callback``6(System.Action{``0,``1,``2,``3,``4,``5})"> | |
208 <summary> | |
209 Specifies a callback to invoke when the method is called that receives the original arguments. | |
210 </summary> | |
211 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
212 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
213 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
214 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
215 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
216 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
217 <param name="action">The callback method to invoke.</param> | |
218 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
219 <example> | |
220 Invokes the given callback with the concrete invocation arguments values. | |
221 <para> | |
222 Notice how the specific arguments are retrieved by simply declaring | |
223 them as part of the lambda expression for the callback: | |
224 </para> | |
225 <code> | |
226 mock.Setup(x => x.Execute( | |
227 It.IsAny<string>(), | |
228 It.IsAny<string>(), | |
229 It.IsAny<string>(), | |
230 It.IsAny<string>(), | |
231 It.IsAny<string>(), | |
232 It.IsAny<string>())) | |
233 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6)); | |
234 </code> | |
235 </example> | |
236 </member> | |
237 <member name="M:Moq.Language.ICallback.Callback``7(System.Action{``0,``1,``2,``3,``4,``5,``6})"> | |
238 <summary> | |
239 Specifies a callback to invoke when the method is called that receives the original arguments. | |
240 </summary> | |
241 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
242 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
243 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
244 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
245 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
246 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
247 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
248 <param name="action">The callback method to invoke.</param> | |
249 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
250 <example> | |
251 Invokes the given callback with the concrete invocation arguments values. | |
252 <para> | |
253 Notice how the specific arguments are retrieved by simply declaring | |
254 them as part of the lambda expression for the callback: | |
255 </para> | |
256 <code> | |
257 mock.Setup(x => x.Execute( | |
258 It.IsAny<string>(), | |
259 It.IsAny<string>(), | |
260 It.IsAny<string>(), | |
261 It.IsAny<string>(), | |
262 It.IsAny<string>(), | |
263 It.IsAny<string>(), | |
264 It.IsAny<string>())) | |
265 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7)); | |
266 </code> | |
267 </example> | |
268 </member> | |
269 <member name="M:Moq.Language.ICallback.Callback``8(System.Action{``0,``1,``2,``3,``4,``5,``6,``7})"> | |
270 <summary> | |
271 Specifies a callback to invoke when the method is called that receives the original arguments. | |
272 </summary> | |
273 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
274 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
275 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
276 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
277 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
278 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
279 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
280 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
281 <param name="action">The callback method to invoke.</param> | |
282 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
283 <example> | |
284 Invokes the given callback with the concrete invocation arguments values. | |
285 <para> | |
286 Notice how the specific arguments are retrieved by simply declaring | |
287 them as part of the lambda expression for the callback: | |
288 </para> | |
289 <code> | |
290 mock.Setup(x => x.Execute( | |
291 It.IsAny<string>(), | |
292 It.IsAny<string>(), | |
293 It.IsAny<string>(), | |
294 It.IsAny<string>(), | |
295 It.IsAny<string>(), | |
296 It.IsAny<string>(), | |
297 It.IsAny<string>(), | |
298 It.IsAny<string>())) | |
299 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8)); | |
300 </code> | |
301 </example> | |
302 </member> | |
303 <member name="M:Moq.Language.ICallback.Callback``9(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8})"> | |
304 <summary> | |
305 Specifies a callback to invoke when the method is called that receives the original arguments. | |
306 </summary> | |
307 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
308 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
309 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
310 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
311 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
312 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
313 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
314 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
315 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
316 <param name="action">The callback method to invoke.</param> | |
317 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
318 <example> | |
319 Invokes the given callback with the concrete invocation arguments values. | |
320 <para> | |
321 Notice how the specific arguments are retrieved by simply declaring | |
322 them as part of the lambda expression for the callback: | |
323 </para> | |
324 <code> | |
325 mock.Setup(x => x.Execute( | |
326 It.IsAny<string>(), | |
327 It.IsAny<string>(), | |
328 It.IsAny<string>(), | |
329 It.IsAny<string>(), | |
330 It.IsAny<string>(), | |
331 It.IsAny<string>(), | |
332 It.IsAny<string>(), | |
333 It.IsAny<string>(), | |
334 It.IsAny<string>())) | |
335 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9)); | |
336 </code> | |
337 </example> | |
338 </member> | |
339 <member name="M:Moq.Language.ICallback.Callback``10(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9})"> | |
340 <summary> | |
341 Specifies a callback to invoke when the method is called that receives the original arguments. | |
342 </summary> | |
343 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
344 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
345 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
346 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
347 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
348 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
349 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
350 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
351 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
352 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
353 <param name="action">The callback method to invoke.</param> | |
354 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
355 <example> | |
356 Invokes the given callback with the concrete invocation arguments values. | |
357 <para> | |
358 Notice how the specific arguments are retrieved by simply declaring | |
359 them as part of the lambda expression for the callback: | |
360 </para> | |
361 <code> | |
362 mock.Setup(x => x.Execute( | |
363 It.IsAny<string>(), | |
364 It.IsAny<string>(), | |
365 It.IsAny<string>(), | |
366 It.IsAny<string>(), | |
367 It.IsAny<string>(), | |
368 It.IsAny<string>(), | |
369 It.IsAny<string>(), | |
370 It.IsAny<string>(), | |
371 It.IsAny<string>(), | |
372 It.IsAny<string>())) | |
373 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10)); | |
374 </code> | |
375 </example> | |
376 </member> | |
377 <member name="M:Moq.Language.ICallback.Callback``11(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10})"> | |
378 <summary> | |
379 Specifies a callback to invoke when the method is called that receives the original arguments. | |
380 </summary> | |
381 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
382 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
383 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
384 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
385 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
386 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
387 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
388 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
389 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
390 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
391 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
392 <param name="action">The callback method to invoke.</param> | |
393 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
394 <example> | |
395 Invokes the given callback with the concrete invocation arguments values. | |
396 <para> | |
397 Notice how the specific arguments are retrieved by simply declaring | |
398 them as part of the lambda expression for the callback: | |
399 </para> | |
400 <code> | |
401 mock.Setup(x => x.Execute( | |
402 It.IsAny<string>(), | |
403 It.IsAny<string>(), | |
404 It.IsAny<string>(), | |
405 It.IsAny<string>(), | |
406 It.IsAny<string>(), | |
407 It.IsAny<string>(), | |
408 It.IsAny<string>(), | |
409 It.IsAny<string>(), | |
410 It.IsAny<string>(), | |
411 It.IsAny<string>(), | |
412 It.IsAny<string>())) | |
413 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11)); | |
414 </code> | |
415 </example> | |
416 </member> | |
417 <member name="M:Moq.Language.ICallback.Callback``12(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11})"> | |
418 <summary> | |
419 Specifies a callback to invoke when the method is called that receives the original arguments. | |
420 </summary> | |
421 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
422 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
423 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
424 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
425 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
426 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
427 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
428 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
429 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
430 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
431 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
432 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
433 <param name="action">The callback method to invoke.</param> | |
434 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
435 <example> | |
436 Invokes the given callback with the concrete invocation arguments values. | |
437 <para> | |
438 Notice how the specific arguments are retrieved by simply declaring | |
439 them as part of the lambda expression for the callback: | |
440 </para> | |
441 <code> | |
442 mock.Setup(x => x.Execute( | |
443 It.IsAny<string>(), | |
444 It.IsAny<string>(), | |
445 It.IsAny<string>(), | |
446 It.IsAny<string>(), | |
447 It.IsAny<string>(), | |
448 It.IsAny<string>(), | |
449 It.IsAny<string>(), | |
450 It.IsAny<string>(), | |
451 It.IsAny<string>(), | |
452 It.IsAny<string>(), | |
453 It.IsAny<string>(), | |
454 It.IsAny<string>())) | |
455 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12)); | |
456 </code> | |
457 </example> | |
458 </member> | |
459 <member name="M:Moq.Language.ICallback.Callback``13(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12})"> | |
460 <summary> | |
461 Specifies a callback to invoke when the method is called that receives the original arguments. | |
462 </summary> | |
463 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
464 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
465 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
466 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
467 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
468 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
469 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
470 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
471 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
472 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
473 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
474 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
475 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
476 <param name="action">The callback method to invoke.</param> | |
477 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
478 <example> | |
479 Invokes the given callback with the concrete invocation arguments values. | |
480 <para> | |
481 Notice how the specific arguments are retrieved by simply declaring | |
482 them as part of the lambda expression for the callback: | |
483 </para> | |
484 <code> | |
485 mock.Setup(x => x.Execute( | |
486 It.IsAny<string>(), | |
487 It.IsAny<string>(), | |
488 It.IsAny<string>(), | |
489 It.IsAny<string>(), | |
490 It.IsAny<string>(), | |
491 It.IsAny<string>(), | |
492 It.IsAny<string>(), | |
493 It.IsAny<string>(), | |
494 It.IsAny<string>(), | |
495 It.IsAny<string>(), | |
496 It.IsAny<string>(), | |
497 It.IsAny<string>(), | |
498 It.IsAny<string>())) | |
499 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13)); | |
500 </code> | |
501 </example> | |
502 </member> | |
503 <member name="M:Moq.Language.ICallback.Callback``14(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13})"> | |
504 <summary> | |
505 Specifies a callback to invoke when the method is called that receives the original arguments. | |
506 </summary> | |
507 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
508 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
509 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
510 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
511 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
512 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
513 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
514 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
515 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
516 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
517 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
518 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
519 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
520 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam> | |
521 <param name="action">The callback method to invoke.</param> | |
522 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
523 <example> | |
524 Invokes the given callback with the concrete invocation arguments values. | |
525 <para> | |
526 Notice how the specific arguments are retrieved by simply declaring | |
527 them as part of the lambda expression for the callback: | |
528 </para> | |
529 <code> | |
530 mock.Setup(x => x.Execute( | |
531 It.IsAny<string>(), | |
532 It.IsAny<string>(), | |
533 It.IsAny<string>(), | |
534 It.IsAny<string>(), | |
535 It.IsAny<string>(), | |
536 It.IsAny<string>(), | |
537 It.IsAny<string>(), | |
538 It.IsAny<string>(), | |
539 It.IsAny<string>(), | |
540 It.IsAny<string>(), | |
541 It.IsAny<string>(), | |
542 It.IsAny<string>(), | |
543 It.IsAny<string>(), | |
544 It.IsAny<string>())) | |
545 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14)); | |
546 </code> | |
547 </example> | |
548 </member> | |
549 <member name="M:Moq.Language.ICallback.Callback``15(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14})"> | |
550 <summary> | |
551 Specifies a callback to invoke when the method is called that receives the original arguments. | |
552 </summary> | |
553 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
554 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
555 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
556 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
557 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
558 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
559 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
560 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
561 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
562 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
563 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
564 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
565 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
566 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam> | |
567 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam> | |
568 <param name="action">The callback method to invoke.</param> | |
569 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
570 <example> | |
571 Invokes the given callback with the concrete invocation arguments values. | |
572 <para> | |
573 Notice how the specific arguments are retrieved by simply declaring | |
574 them as part of the lambda expression for the callback: | |
575 </para> | |
576 <code> | |
577 mock.Setup(x => x.Execute( | |
578 It.IsAny<string>(), | |
579 It.IsAny<string>(), | |
580 It.IsAny<string>(), | |
581 It.IsAny<string>(), | |
582 It.IsAny<string>(), | |
583 It.IsAny<string>(), | |
584 It.IsAny<string>(), | |
585 It.IsAny<string>(), | |
586 It.IsAny<string>(), | |
587 It.IsAny<string>(), | |
588 It.IsAny<string>(), | |
589 It.IsAny<string>(), | |
590 It.IsAny<string>(), | |
591 It.IsAny<string>(), | |
592 It.IsAny<string>())) | |
593 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15)); | |
594 </code> | |
595 </example> | |
596 </member> | |
597 <member name="M:Moq.Language.ICallback.Callback``16(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15})"> | |
598 <summary> | |
599 Specifies a callback to invoke when the method is called that receives the original arguments. | |
600 </summary> | |
601 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
602 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
603 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
604 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
605 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
606 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
607 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
608 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
609 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
610 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
611 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
612 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
613 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
614 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam> | |
615 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam> | |
616 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam> | |
617 <param name="action">The callback method to invoke.</param> | |
618 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns> | |
619 <example> | |
620 Invokes the given callback with the concrete invocation arguments values. | |
621 <para> | |
622 Notice how the specific arguments are retrieved by simply declaring | |
623 them as part of the lambda expression for the callback: | |
624 </para> | |
625 <code> | |
626 mock.Setup(x => x.Execute( | |
627 It.IsAny<string>(), | |
628 It.IsAny<string>(), | |
629 It.IsAny<string>(), | |
630 It.IsAny<string>(), | |
631 It.IsAny<string>(), | |
632 It.IsAny<string>(), | |
633 It.IsAny<string>(), | |
634 It.IsAny<string>(), | |
635 It.IsAny<string>(), | |
636 It.IsAny<string>(), | |
637 It.IsAny<string>(), | |
638 It.IsAny<string>(), | |
639 It.IsAny<string>(), | |
640 It.IsAny<string>(), | |
641 It.IsAny<string>(), | |
642 It.IsAny<string>())) | |
643 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16)); | |
644 </code> | |
645 </example> | |
646 </member> | |
647 <member name="T:Moq.Language.ICallback`2"> | |
648 <summary> | |
649 Defines the <c>Callback</c> verb and overloads for callbacks on | |
650 setups that return a value. | |
651 </summary> | |
652 <typeparam name="TMock">Mocked type.</typeparam> | |
653 <typeparam name="TResult">Type of the return value of the setup.</typeparam> | |
654 </member> | |
655 <member name="M:Moq.Language.ICallback`2.Callback(System.Action)"> | |
656 <summary> | |
657 Specifies a callback to invoke when the method is called. | |
658 </summary> | |
659 <param name="action">The callback method to invoke.</param> | |
660 <example> | |
661 The following example specifies a callback to set a boolean value that can be used later: | |
662 <code> | |
663 var called = false; | |
664 mock.Setup(x => x.Execute()) | |
665 .Callback(() => called = true) | |
666 .Returns(true); | |
667 </code> | |
668 Note that in the case of value-returning methods, after the <c>Callback</c> | |
669 call you can still specify the return value. | |
670 </example> | |
671 </member> | |
672 <member name="M:Moq.Language.ICallback`2.Callback``1(System.Action{``0})"> | |
673 <summary> | |
674 Specifies a callback to invoke when the method is called that receives the original arguments. | |
675 </summary> | |
676 <typeparam name="T">The type of the argument of the invoked method.</typeparam> | |
677 <param name="action">Callback method to invoke.</param> | |
678 <example> | |
679 Invokes the given callback with the concrete invocation argument value. | |
680 <para> | |
681 Notice how the specific string argument is retrieved by simply declaring | |
682 it as part of the lambda expression for the callback: | |
683 </para> | |
684 <code> | |
685 mock.Setup(x => x.Execute(It.IsAny<string>())) | |
686 .Callback(command => Console.WriteLine(command)) | |
687 .Returns(true); | |
688 </code> | |
689 </example> | |
690 </member> | |
691 <member name="M:Moq.Language.ICallback`2.Callback``2(System.Action{``0,``1})"> | |
692 <summary> | |
693 Specifies a callback to invoke when the method is called that receives the original | |
694 arguments. | |
695 </summary> | |
696 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
697 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
698 <param name="action">The callback method to invoke.</param> | |
699 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
700 <example> | |
701 Invokes the given callback with the concrete invocation arguments values. | |
702 <para> | |
703 Notice how the specific arguments are retrieved by simply declaring | |
704 them as part of the lambda expression for the callback: | |
705 </para> | |
706 <code> | |
707 mock.Setup(x => x.Execute( | |
708 It.IsAny<string>(), | |
709 It.IsAny<string>())) | |
710 .Callback((arg1, arg2) => Console.WriteLine(arg1 + arg2)); | |
711 </code> | |
712 </example> | |
713 </member> | |
714 <member name="M:Moq.Language.ICallback`2.Callback``3(System.Action{``0,``1,``2})"> | |
715 <summary> | |
716 Specifies a callback to invoke when the method is called that receives the original | |
717 arguments. | |
718 </summary> | |
719 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
720 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
721 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
722 <param name="action">The callback method to invoke.</param> | |
723 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
724 <example> | |
725 Invokes the given callback with the concrete invocation arguments values. | |
726 <para> | |
727 Notice how the specific arguments are retrieved by simply declaring | |
728 them as part of the lambda expression for the callback: | |
729 </para> | |
730 <code> | |
731 mock.Setup(x => x.Execute( | |
732 It.IsAny<string>(), | |
733 It.IsAny<string>(), | |
734 It.IsAny<string>())) | |
735 .Callback((arg1, arg2, arg3) => Console.WriteLine(arg1 + arg2 + arg3)); | |
736 </code> | |
737 </example> | |
738 </member> | |
739 <member name="M:Moq.Language.ICallback`2.Callback``4(System.Action{``0,``1,``2,``3})"> | |
740 <summary> | |
741 Specifies a callback to invoke when the method is called that receives the original | |
742 arguments. | |
743 </summary> | |
744 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
745 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
746 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
747 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
748 <param name="action">The callback method to invoke.</param> | |
749 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
750 <example> | |
751 Invokes the given callback with the concrete invocation arguments values. | |
752 <para> | |
753 Notice how the specific arguments are retrieved by simply declaring | |
754 them as part of the lambda expression for the callback: | |
755 </para> | |
756 <code> | |
757 mock.Setup(x => x.Execute( | |
758 It.IsAny<string>(), | |
759 It.IsAny<string>(), | |
760 It.IsAny<string>(), | |
761 It.IsAny<string>())) | |
762 .Callback((arg1, arg2, arg3, arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); | |
763 </code> | |
764 </example> | |
765 </member> | |
766 <member name="M:Moq.Language.ICallback`2.Callback``5(System.Action{``0,``1,``2,``3,``4})"> | |
767 <summary> | |
768 Specifies a callback to invoke when the method is called that receives the original | |
769 arguments. | |
770 </summary> | |
771 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
772 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
773 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
774 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
775 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
776 <param name="action">The callback method to invoke.</param> | |
777 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
778 <example> | |
779 Invokes the given callback with the concrete invocation arguments values. | |
780 <para> | |
781 Notice how the specific arguments are retrieved by simply declaring | |
782 them as part of the lambda expression for the callback: | |
783 </para> | |
784 <code> | |
785 mock.Setup(x => x.Execute( | |
786 It.IsAny<string>(), | |
787 It.IsAny<string>(), | |
788 It.IsAny<string>(), | |
789 It.IsAny<string>(), | |
790 It.IsAny<string>())) | |
791 .Callback((arg1, arg2, arg3, arg4, arg5) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5)); | |
792 </code> | |
793 </example> | |
794 </member> | |
795 <member name="M:Moq.Language.ICallback`2.Callback``6(System.Action{``0,``1,``2,``3,``4,``5})"> | |
796 <summary> | |
797 Specifies a callback to invoke when the method is called that receives the original | |
798 arguments. | |
799 </summary> | |
800 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
801 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
802 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
803 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
804 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
805 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
806 <param name="action">The callback method to invoke.</param> | |
807 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
808 <example> | |
809 Invokes the given callback with the concrete invocation arguments values. | |
810 <para> | |
811 Notice how the specific arguments are retrieved by simply declaring | |
812 them as part of the lambda expression for the callback: | |
813 </para> | |
814 <code> | |
815 mock.Setup(x => x.Execute( | |
816 It.IsAny<string>(), | |
817 It.IsAny<string>(), | |
818 It.IsAny<string>(), | |
819 It.IsAny<string>(), | |
820 It.IsAny<string>(), | |
821 It.IsAny<string>())) | |
822 .Callback((arg1, arg2, arg3, arg4, arg5, arg6) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6)); | |
823 </code> | |
824 </example> | |
825 </member> | |
826 <member name="M:Moq.Language.ICallback`2.Callback``7(System.Action{``0,``1,``2,``3,``4,``5,``6})"> | |
827 <summary> | |
828 Specifies a callback to invoke when the method is called that receives the original | |
829 arguments. | |
830 </summary> | |
831 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
832 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
833 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
834 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
835 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
836 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
837 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
838 <param name="action">The callback method to invoke.</param> | |
839 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
840 <example> | |
841 Invokes the given callback with the concrete invocation arguments values. | |
842 <para> | |
843 Notice how the specific arguments are retrieved by simply declaring | |
844 them as part of the lambda expression for the callback: | |
845 </para> | |
846 <code> | |
847 mock.Setup(x => x.Execute( | |
848 It.IsAny<string>(), | |
849 It.IsAny<string>(), | |
850 It.IsAny<string>(), | |
851 It.IsAny<string>(), | |
852 It.IsAny<string>(), | |
853 It.IsAny<string>(), | |
854 It.IsAny<string>())) | |
855 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7)); | |
856 </code> | |
857 </example> | |
858 </member> | |
859 <member name="M:Moq.Language.ICallback`2.Callback``8(System.Action{``0,``1,``2,``3,``4,``5,``6,``7})"> | |
860 <summary> | |
861 Specifies a callback to invoke when the method is called that receives the original | |
862 arguments. | |
863 </summary> | |
864 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
865 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
866 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
867 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
868 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
869 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
870 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
871 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
872 <param name="action">The callback method to invoke.</param> | |
873 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
874 <example> | |
875 Invokes the given callback with the concrete invocation arguments values. | |
876 <para> | |
877 Notice how the specific arguments are retrieved by simply declaring | |
878 them as part of the lambda expression for the callback: | |
879 </para> | |
880 <code> | |
881 mock.Setup(x => x.Execute( | |
882 It.IsAny<string>(), | |
883 It.IsAny<string>(), | |
884 It.IsAny<string>(), | |
885 It.IsAny<string>(), | |
886 It.IsAny<string>(), | |
887 It.IsAny<string>(), | |
888 It.IsAny<string>(), | |
889 It.IsAny<string>())) | |
890 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8)); | |
891 </code> | |
892 </example> | |
893 </member> | |
894 <member name="M:Moq.Language.ICallback`2.Callback``9(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8})"> | |
895 <summary> | |
896 Specifies a callback to invoke when the method is called that receives the original | |
897 arguments. | |
898 </summary> | |
899 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
900 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
901 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
902 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
903 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
904 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
905 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
906 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
907 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
908 <param name="action">The callback method to invoke.</param> | |
909 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
910 <example> | |
911 Invokes the given callback with the concrete invocation arguments values. | |
912 <para> | |
913 Notice how the specific arguments are retrieved by simply declaring | |
914 them as part of the lambda expression for the callback: | |
915 </para> | |
916 <code> | |
917 mock.Setup(x => x.Execute( | |
918 It.IsAny<string>(), | |
919 It.IsAny<string>(), | |
920 It.IsAny<string>(), | |
921 It.IsAny<string>(), | |
922 It.IsAny<string>(), | |
923 It.IsAny<string>(), | |
924 It.IsAny<string>(), | |
925 It.IsAny<string>(), | |
926 It.IsAny<string>())) | |
927 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9)); | |
928 </code> | |
929 </example> | |
930 </member> | |
931 <member name="M:Moq.Language.ICallback`2.Callback``10(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9})"> | |
932 <summary> | |
933 Specifies a callback to invoke when the method is called that receives the original | |
934 arguments. | |
935 </summary> | |
936 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
937 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
938 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
939 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
940 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
941 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
942 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
943 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
944 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
945 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
946 <param name="action">The callback method to invoke.</param> | |
947 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
948 <example> | |
949 Invokes the given callback with the concrete invocation arguments values. | |
950 <para> | |
951 Notice how the specific arguments are retrieved by simply declaring | |
952 them as part of the lambda expression for the callback: | |
953 </para> | |
954 <code> | |
955 mock.Setup(x => x.Execute( | |
956 It.IsAny<string>(), | |
957 It.IsAny<string>(), | |
958 It.IsAny<string>(), | |
959 It.IsAny<string>(), | |
960 It.IsAny<string>(), | |
961 It.IsAny<string>(), | |
962 It.IsAny<string>(), | |
963 It.IsAny<string>(), | |
964 It.IsAny<string>(), | |
965 It.IsAny<string>())) | |
966 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10)); | |
967 </code> | |
968 </example> | |
969 </member> | |
970 <member name="M:Moq.Language.ICallback`2.Callback``11(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10})"> | |
971 <summary> | |
972 Specifies a callback to invoke when the method is called that receives the original | |
973 arguments. | |
974 </summary> | |
975 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
976 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
977 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
978 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
979 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
980 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
981 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
982 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
983 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
984 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
985 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
986 <param name="action">The callback method to invoke.</param> | |
987 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
988 <example> | |
989 Invokes the given callback with the concrete invocation arguments values. | |
990 <para> | |
991 Notice how the specific arguments are retrieved by simply declaring | |
992 them as part of the lambda expression for the callback: | |
993 </para> | |
994 <code> | |
995 mock.Setup(x => x.Execute( | |
996 It.IsAny<string>(), | |
997 It.IsAny<string>(), | |
998 It.IsAny<string>(), | |
999 It.IsAny<string>(), | |
1000 It.IsAny<string>(), | |
1001 It.IsAny<string>(), | |
1002 It.IsAny<string>(), | |
1003 It.IsAny<string>(), | |
1004 It.IsAny<string>(), | |
1005 It.IsAny<string>(), | |
1006 It.IsAny<string>())) | |
1007 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11)); | |
1008 </code> | |
1009 </example> | |
1010 </member> | |
1011 <member name="M:Moq.Language.ICallback`2.Callback``12(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11})"> | |
1012 <summary> | |
1013 Specifies a callback to invoke when the method is called that receives the original | |
1014 arguments. | |
1015 </summary> | |
1016 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1017 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1018 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1019 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1020 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1021 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1022 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1023 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
1024 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
1025 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
1026 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
1027 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
1028 <param name="action">The callback method to invoke.</param> | |
1029 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
1030 <example> | |
1031 Invokes the given callback with the concrete invocation arguments values. | |
1032 <para> | |
1033 Notice how the specific arguments are retrieved by simply declaring | |
1034 them as part of the lambda expression for the callback: | |
1035 </para> | |
1036 <code> | |
1037 mock.Setup(x => x.Execute( | |
1038 It.IsAny<string>(), | |
1039 It.IsAny<string>(), | |
1040 It.IsAny<string>(), | |
1041 It.IsAny<string>(), | |
1042 It.IsAny<string>(), | |
1043 It.IsAny<string>(), | |
1044 It.IsAny<string>(), | |
1045 It.IsAny<string>(), | |
1046 It.IsAny<string>(), | |
1047 It.IsAny<string>(), | |
1048 It.IsAny<string>(), | |
1049 It.IsAny<string>())) | |
1050 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12)); | |
1051 </code> | |
1052 </example> | |
1053 </member> | |
1054 <member name="M:Moq.Language.ICallback`2.Callback``13(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12})"> | |
1055 <summary> | |
1056 Specifies a callback to invoke when the method is called that receives the original | |
1057 arguments. | |
1058 </summary> | |
1059 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1060 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1061 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1062 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1063 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1064 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1065 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1066 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
1067 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
1068 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
1069 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
1070 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
1071 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
1072 <param name="action">The callback method to invoke.</param> | |
1073 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
1074 <example> | |
1075 Invokes the given callback with the concrete invocation arguments values. | |
1076 <para> | |
1077 Notice how the specific arguments are retrieved by simply declaring | |
1078 them as part of the lambda expression for the callback: | |
1079 </para> | |
1080 <code> | |
1081 mock.Setup(x => x.Execute( | |
1082 It.IsAny<string>(), | |
1083 It.IsAny<string>(), | |
1084 It.IsAny<string>(), | |
1085 It.IsAny<string>(), | |
1086 It.IsAny<string>(), | |
1087 It.IsAny<string>(), | |
1088 It.IsAny<string>(), | |
1089 It.IsAny<string>(), | |
1090 It.IsAny<string>(), | |
1091 It.IsAny<string>(), | |
1092 It.IsAny<string>(), | |
1093 It.IsAny<string>(), | |
1094 It.IsAny<string>())) | |
1095 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13)); | |
1096 </code> | |
1097 </example> | |
1098 </member> | |
1099 <member name="M:Moq.Language.ICallback`2.Callback``14(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13})"> | |
1100 <summary> | |
1101 Specifies a callback to invoke when the method is called that receives the original | |
1102 arguments. | |
1103 </summary> | |
1104 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1105 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1106 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1107 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1108 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1109 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1110 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1111 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
1112 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
1113 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
1114 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
1115 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
1116 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
1117 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam> | |
1118 <param name="action">The callback method to invoke.</param> | |
1119 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
1120 <example> | |
1121 Invokes the given callback with the concrete invocation arguments values. | |
1122 <para> | |
1123 Notice how the specific arguments are retrieved by simply declaring | |
1124 them as part of the lambda expression for the callback: | |
1125 </para> | |
1126 <code> | |
1127 mock.Setup(x => x.Execute( | |
1128 It.IsAny<string>(), | |
1129 It.IsAny<string>(), | |
1130 It.IsAny<string>(), | |
1131 It.IsAny<string>(), | |
1132 It.IsAny<string>(), | |
1133 It.IsAny<string>(), | |
1134 It.IsAny<string>(), | |
1135 It.IsAny<string>(), | |
1136 It.IsAny<string>(), | |
1137 It.IsAny<string>(), | |
1138 It.IsAny<string>(), | |
1139 It.IsAny<string>(), | |
1140 It.IsAny<string>(), | |
1141 It.IsAny<string>())) | |
1142 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14)); | |
1143 </code> | |
1144 </example> | |
1145 </member> | |
1146 <member name="M:Moq.Language.ICallback`2.Callback``15(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14})"> | |
1147 <summary> | |
1148 Specifies a callback to invoke when the method is called that receives the original | |
1149 arguments. | |
1150 </summary> | |
1151 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1152 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1153 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1154 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1155 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1156 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1157 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1158 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
1159 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
1160 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
1161 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
1162 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
1163 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
1164 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam> | |
1165 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam> | |
1166 <param name="action">The callback method to invoke.</param> | |
1167 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
1168 <example> | |
1169 Invokes the given callback with the concrete invocation arguments values. | |
1170 <para> | |
1171 Notice how the specific arguments are retrieved by simply declaring | |
1172 them as part of the lambda expression for the callback: | |
1173 </para> | |
1174 <code> | |
1175 mock.Setup(x => x.Execute( | |
1176 It.IsAny<string>(), | |
1177 It.IsAny<string>(), | |
1178 It.IsAny<string>(), | |
1179 It.IsAny<string>(), | |
1180 It.IsAny<string>(), | |
1181 It.IsAny<string>(), | |
1182 It.IsAny<string>(), | |
1183 It.IsAny<string>(), | |
1184 It.IsAny<string>(), | |
1185 It.IsAny<string>(), | |
1186 It.IsAny<string>(), | |
1187 It.IsAny<string>(), | |
1188 It.IsAny<string>(), | |
1189 It.IsAny<string>(), | |
1190 It.IsAny<string>())) | |
1191 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15)); | |
1192 </code> | |
1193 </example> | |
1194 </member> | |
1195 <member name="M:Moq.Language.ICallback`2.Callback``16(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15})"> | |
1196 <summary> | |
1197 Specifies a callback to invoke when the method is called that receives the original | |
1198 arguments. | |
1199 </summary> | |
1200 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1201 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1202 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1203 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1204 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1205 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1206 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1207 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
1208 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
1209 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
1210 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
1211 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
1212 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
1213 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam> | |
1214 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam> | |
1215 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam> | |
1216 <param name="action">The callback method to invoke.</param> | |
1217 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns> | |
1218 <example> | |
1219 Invokes the given callback with the concrete invocation arguments values. | |
1220 <para> | |
1221 Notice how the specific arguments are retrieved by simply declaring | |
1222 them as part of the lambda expression for the callback: | |
1223 </para> | |
1224 <code> | |
1225 mock.Setup(x => x.Execute( | |
1226 It.IsAny<string>(), | |
1227 It.IsAny<string>(), | |
1228 It.IsAny<string>(), | |
1229 It.IsAny<string>(), | |
1230 It.IsAny<string>(), | |
1231 It.IsAny<string>(), | |
1232 It.IsAny<string>(), | |
1233 It.IsAny<string>(), | |
1234 It.IsAny<string>(), | |
1235 It.IsAny<string>(), | |
1236 It.IsAny<string>(), | |
1237 It.IsAny<string>(), | |
1238 It.IsAny<string>(), | |
1239 It.IsAny<string>(), | |
1240 It.IsAny<string>(), | |
1241 It.IsAny<string>())) | |
1242 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16)); | |
1243 </code> | |
1244 </example> | |
1245 </member> | |
1246 <member name="T:Moq.Language.IRaise`1"> | |
1247 <summary> | |
1248 Defines the <c>Raises</c> verb. | |
1249 </summary> | |
1250 </member> | |
1251 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"> | |
1252 <summary> | |
1253 Specifies the event that will be raised | |
1254 when the setup is met. | |
1255 </summary> | |
1256 <param name="eventExpression">An expression that represents an event attach or detach action.</param> | |
1257 <param name="args">The event arguments to pass for the raised event.</param> | |
1258 <example> | |
1259 The following example shows how to raise an event when | |
1260 the setup is met: | |
1261 <code> | |
1262 var mock = new Mock<IContainer>(); | |
1263 | |
1264 mock.Setup(add => add.Add(It.IsAny<string>(), It.IsAny<object>())) | |
1265 .Raises(add => add.Added += null, EventArgs.Empty); | |
1266 </code> | |
1267 </example> | |
1268 </member> | |
1269 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.Func{System.EventArgs})"> | |
1270 <summary> | |
1271 Specifies the event that will be raised | |
1272 when the setup is matched. | |
1273 </summary> | |
1274 <param name="eventExpression">An expression that represents an event attach or detach action.</param> | |
1275 <param name="func">A function that will build the <see cref="T:System.EventArgs"/> | |
1276 to pass when raising the event.</param> | |
1277 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1278 </member> | |
1279 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.Object[])"> | |
1280 <summary> | |
1281 Specifies the custom event that will be raised | |
1282 when the setup is matched. | |
1283 </summary> | |
1284 <param name="eventExpression">An expression that represents an event attach or detach action.</param> | |
1285 <param name="args">The arguments to pass to the custom delegate (non EventHandler-compatible).</param> | |
1286 </member> | |
1287 <member name="M:Moq.Language.IRaise`1.Raises``1(System.Action{`0},System.Func{``0,System.EventArgs})"> | |
1288 <summary> | |
1289 Specifies the event that will be raised when the setup is matched. | |
1290 </summary> | |
1291 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1292 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1293 to pass when raising the event.</param> | |
1294 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1295 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1296 </member> | |
1297 <member name="M:Moq.Language.IRaise`1.Raises``2(System.Action{`0},System.Func{``0,``1,System.EventArgs})"> | |
1298 <summary> | |
1299 Specifies the event that will be raised when the setup is matched. | |
1300 </summary> | |
1301 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1302 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1303 to pass when raising the event.</param> | |
1304 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1305 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1306 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1307 </member> | |
1308 <member name="M:Moq.Language.IRaise`1.Raises``3(System.Action{`0},System.Func{``0,``1,``2,System.EventArgs})"> | |
1309 <summary> | |
1310 Specifies the event that will be raised when the setup is matched. | |
1311 </summary> | |
1312 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1313 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1314 to pass when raising the event.</param> | |
1315 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1316 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1317 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1318 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1319 </member> | |
1320 <member name="M:Moq.Language.IRaise`1.Raises``4(System.Action{`0},System.Func{``0,``1,``2,``3,System.EventArgs})"> | |
1321 <summary> | |
1322 Specifies the event that will be raised when the setup is matched. | |
1323 </summary> | |
1324 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1325 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1326 to pass when raising the event.</param> | |
1327 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1328 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1329 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1330 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1331 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1332 </member> | |
1333 <member name="M:Moq.Language.IRaise`1.Raises``5(System.Action{`0},System.Func{``0,``1,``2,``3,``4,System.EventArgs})"> | |
1334 <summary> | |
1335 Specifies the event that will be raised when the setup is matched. | |
1336 </summary> | |
1337 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1338 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1339 to pass when raising the event.</param> | |
1340 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1341 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1342 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1343 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1344 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1345 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1346 </member> | |
1347 <member name="M:Moq.Language.IRaise`1.Raises``6(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,System.EventArgs})"> | |
1348 <summary> | |
1349 Specifies the event that will be raised when the setup is matched. | |
1350 </summary> | |
1351 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1352 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1353 to pass when raising the event.</param> | |
1354 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1355 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1356 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1357 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1358 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1359 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1360 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1361 </member> | |
1362 <member name="M:Moq.Language.IRaise`1.Raises``7(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,System.EventArgs})"> | |
1363 <summary> | |
1364 Specifies the event that will be raised when the setup is matched. | |
1365 </summary> | |
1366 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1367 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1368 to pass when raising the event.</param> | |
1369 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1370 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1371 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1372 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1373 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1374 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1375 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam> | |
1376 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1377 </member> | |
1378 <member name="M:Moq.Language.IRaise`1.Raises``8(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,System.EventArgs})"> | |
1379 <summary> | |
1380 Specifies the event that will be raised when the setup is matched. | |
1381 </summary> | |
1382 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1383 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1384 to pass when raising the event.</param> | |
1385 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1386 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1387 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1388 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1389 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1390 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1391 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam> | |
1392 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam> | |
1393 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1394 </member> | |
1395 <member name="M:Moq.Language.IRaise`1.Raises``9(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,System.EventArgs})"> | |
1396 <summary> | |
1397 Specifies the event that will be raised when the setup is matched. | |
1398 </summary> | |
1399 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1400 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1401 to pass when raising the event.</param> | |
1402 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1403 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1404 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1405 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1406 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1407 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1408 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam> | |
1409 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam> | |
1410 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam> | |
1411 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1412 </member> | |
1413 <member name="M:Moq.Language.IRaise`1.Raises``10(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,System.EventArgs})"> | |
1414 <summary> | |
1415 Specifies the event that will be raised when the setup is matched. | |
1416 </summary> | |
1417 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1418 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1419 to pass when raising the event.</param> | |
1420 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1421 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1422 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1423 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1424 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1425 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1426 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam> | |
1427 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam> | |
1428 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam> | |
1429 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam> | |
1430 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1431 </member> | |
1432 <member name="M:Moq.Language.IRaise`1.Raises``11(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,System.EventArgs})"> | |
1433 <summary> | |
1434 Specifies the event that will be raised when the setup is matched. | |
1435 </summary> | |
1436 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1437 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1438 to pass when raising the event.</param> | |
1439 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1440 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1441 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1442 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1443 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1444 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1445 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam> | |
1446 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam> | |
1447 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam> | |
1448 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam> | |
1449 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam> | |
1450 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1451 </member> | |
1452 <member name="M:Moq.Language.IRaise`1.Raises``12(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,System.EventArgs})"> | |
1453 <summary> | |
1454 Specifies the event that will be raised when the setup is matched. | |
1455 </summary> | |
1456 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1457 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1458 to pass when raising the event.</param> | |
1459 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1460 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1461 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1462 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1463 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1464 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1465 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam> | |
1466 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam> | |
1467 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam> | |
1468 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam> | |
1469 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam> | |
1470 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam> | |
1471 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1472 </member> | |
1473 <member name="M:Moq.Language.IRaise`1.Raises``13(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,System.EventArgs})"> | |
1474 <summary> | |
1475 Specifies the event that will be raised when the setup is matched. | |
1476 </summary> | |
1477 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1478 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1479 to pass when raising the event.</param> | |
1480 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1481 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1482 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1483 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1484 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1485 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1486 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam> | |
1487 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam> | |
1488 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam> | |
1489 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam> | |
1490 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam> | |
1491 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam> | |
1492 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam> | |
1493 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1494 </member> | |
1495 <member name="M:Moq.Language.IRaise`1.Raises``14(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,System.EventArgs})"> | |
1496 <summary> | |
1497 Specifies the event that will be raised when the setup is matched. | |
1498 </summary> | |
1499 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1500 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1501 to pass when raising the event.</param> | |
1502 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1503 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1504 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1505 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1506 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1507 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1508 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam> | |
1509 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam> | |
1510 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam> | |
1511 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam> | |
1512 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam> | |
1513 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam> | |
1514 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam> | |
1515 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam> | |
1516 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1517 </member> | |
1518 <member name="M:Moq.Language.IRaise`1.Raises``15(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,System.EventArgs})"> | |
1519 <summary> | |
1520 Specifies the event that will be raised when the setup is matched. | |
1521 </summary> | |
1522 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1523 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1524 to pass when raising the event.</param> | |
1525 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1526 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1527 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1528 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1529 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1530 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1531 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam> | |
1532 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam> | |
1533 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam> | |
1534 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam> | |
1535 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam> | |
1536 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam> | |
1537 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam> | |
1538 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam> | |
1539 <typeparam name="T15">The type of the fifteenth argument received by the expected invocation.</typeparam> | |
1540 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1541 </member> | |
1542 <member name="M:Moq.Language.IRaise`1.Raises``16(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15,System.EventArgs})"> | |
1543 <summary> | |
1544 Specifies the event that will be raised when the setup is matched. | |
1545 </summary> | |
1546 <param name="eventExpression">The expression that represents an event attach or detach action.</param> | |
1547 <param name="func">The function that will build the <see cref="T:System.EventArgs"/> | |
1548 to pass when raising the event.</param> | |
1549 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam> | |
1550 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam> | |
1551 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam> | |
1552 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam> | |
1553 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam> | |
1554 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam> | |
1555 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam> | |
1556 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam> | |
1557 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam> | |
1558 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam> | |
1559 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam> | |
1560 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam> | |
1561 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam> | |
1562 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam> | |
1563 <typeparam name="T15">The type of the fifteenth argument received by the expected invocation.</typeparam> | |
1564 <typeparam name="T16">The type of the sixteenth argument received by the expected invocation.</typeparam> | |
1565 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/> | |
1566 </member> | |
1567 <member name="T:Moq.Language.IReturns`2"> | |
1568 <summary> | |
1569 Defines the <c>Returns</c> verb. | |
1570 </summary> | |
1571 <typeparam name="TMock">Mocked type.</typeparam> | |
1572 <typeparam name="TResult">Type of the return value from the expression.</typeparam> | |
1573 </member> | |
1574 <member name="M:Moq.Language.IReturns`2.Returns(`1)"> | |
1575 <summary> | |
1576 Specifies the value to return. | |
1577 </summary> | |
1578 <param name="value">The value to return, or <see langword="null"/>.</param> | |
1579 <example> | |
1580 Return a <c>true</c> value from the method call: | |
1581 <code> | |
1582 mock.Setup(x => x.Execute("ping")) | |
1583 .Returns(true); | |
1584 </code> | |
1585 </example> | |
1586 </member> | |
1587 <member name="M:Moq.Language.IReturns`2.Returns(System.Func{`1})"> | |
1588 <summary> | |
1589 Specifies a function that will calculate the value to return from the method. | |
1590 </summary> | |
1591 <param name="valueFunction">The function that will calculate the return value.</param> | |
1592 <example group="returns"> | |
1593 Return a calculated value when the method is called: | |
1594 <code> | |
1595 mock.Setup(x => x.Execute("ping")) | |
1596 .Returns(() => returnValues[0]); | |
1597 </code> | |
1598 The lambda expression to retrieve the return value is lazy-executed, | |
1599 meaning that its value may change depending on the moment the method | |
1600 is executed and the value the <c>returnValues</c> array has at | |
1601 that moment. | |
1602 </example> | |
1603 </member> | |
1604 <member name="M:Moq.Language.IReturns`2.Returns``1(System.Func{``0,`1})"> | |
1605 <summary> | |
1606 Specifies a function that will calculate the value to return from the method, | |
1607 retrieving the arguments for the invocation. | |
1608 </summary> | |
1609 <typeparam name="T">The type of the argument of the invoked method.</typeparam> | |
1610 <param name="valueFunction">The function that will calculate the return value.</param> | |
1611 <example group="returns"> | |
1612 Return a calculated value which is evaluated lazily at the time of the invocation. | |
1613 <para> | |
1614 The lookup list can change between invocations and the setup | |
1615 will return different values accordingly. Also, notice how the specific | |
1616 string argument is retrieved by simply declaring it as part of the lambda | |
1617 expression: | |
1618 </para> | |
1619 <code> | |
1620 mock.Setup(x => x.Execute(It.IsAny<string>())) | |
1621 .Returns((string command) => returnValues[command]); | |
1622 </code> | |
1623 </example> | |
1624 </member> | |
1625 <member name="M:Moq.Language.IReturns`2.Returns``2(System.Func{``0,``1,`1})"> | |
1626 <summary> | |
1627 Specifies a function that will calculate the value to return from the method, | |
1628 retrieving the arguments for the invocation. | |
1629 </summary> | |
1630 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1631 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1632 <param name="valueFunction">The function that will calculate the return value.</param> | |
1633 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1634 <example> | |
1635 <para> | |
1636 The return value is calculated from the value of the actual method invocation arguments. | |
1637 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1638 expression: | |
1639 </para> | |
1640 <code> | |
1641 mock.Setup(x => x.Execute( | |
1642 It.IsAny<int>(), | |
1643 It.IsAny<int>())) | |
1644 .Returns((string arg1, string arg2) => arg1 + arg2); | |
1645 </code> | |
1646 </example> | |
1647 </member> | |
1648 <member name="M:Moq.Language.IReturns`2.Returns``3(System.Func{``0,``1,``2,`1})"> | |
1649 <summary> | |
1650 Specifies a function that will calculate the value to return from the method, | |
1651 retrieving the arguments for the invocation. | |
1652 </summary> | |
1653 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1654 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1655 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1656 <param name="valueFunction">The function that will calculate the return value.</param> | |
1657 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1658 <example> | |
1659 <para> | |
1660 The return value is calculated from the value of the actual method invocation arguments. | |
1661 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1662 expression: | |
1663 </para> | |
1664 <code> | |
1665 mock.Setup(x => x.Execute( | |
1666 It.IsAny<int>(), | |
1667 It.IsAny<int>(), | |
1668 It.IsAny<int>())) | |
1669 .Returns((string arg1, string arg2, string arg3) => arg1 + arg2 + arg3); | |
1670 </code> | |
1671 </example> | |
1672 </member> | |
1673 <member name="M:Moq.Language.IReturns`2.Returns``4(System.Func{``0,``1,``2,``3,`1})"> | |
1674 <summary> | |
1675 Specifies a function that will calculate the value to return from the method, | |
1676 retrieving the arguments for the invocation. | |
1677 </summary> | |
1678 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1679 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1680 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1681 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1682 <param name="valueFunction">The function that will calculate the return value.</param> | |
1683 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1684 <example> | |
1685 <para> | |
1686 The return value is calculated from the value of the actual method invocation arguments. | |
1687 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1688 expression: | |
1689 </para> | |
1690 <code> | |
1691 mock.Setup(x => x.Execute( | |
1692 It.IsAny<int>(), | |
1693 It.IsAny<int>(), | |
1694 It.IsAny<int>(), | |
1695 It.IsAny<int>())) | |
1696 .Returns((string arg1, string arg2, string arg3, string arg4) => arg1 + arg2 + arg3 + arg4); | |
1697 </code> | |
1698 </example> | |
1699 </member> | |
1700 <member name="M:Moq.Language.IReturns`2.Returns``5(System.Func{``0,``1,``2,``3,``4,`1})"> | |
1701 <summary> | |
1702 Specifies a function that will calculate the value to return from the method, | |
1703 retrieving the arguments for the invocation. | |
1704 </summary> | |
1705 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1706 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1707 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1708 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1709 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1710 <param name="valueFunction">The function that will calculate the return value.</param> | |
1711 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1712 <example> | |
1713 <para> | |
1714 The return value is calculated from the value of the actual method invocation arguments. | |
1715 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1716 expression: | |
1717 </para> | |
1718 <code> | |
1719 mock.Setup(x => x.Execute( | |
1720 It.IsAny<int>(), | |
1721 It.IsAny<int>(), | |
1722 It.IsAny<int>(), | |
1723 It.IsAny<int>(), | |
1724 It.IsAny<int>())) | |
1725 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5) => arg1 + arg2 + arg3 + arg4 + arg5); | |
1726 </code> | |
1727 </example> | |
1728 </member> | |
1729 <member name="M:Moq.Language.IReturns`2.Returns``6(System.Func{``0,``1,``2,``3,``4,``5,`1})"> | |
1730 <summary> | |
1731 Specifies a function that will calculate the value to return from the method, | |
1732 retrieving the arguments for the invocation. | |
1733 </summary> | |
1734 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1735 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1736 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1737 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1738 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1739 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1740 <param name="valueFunction">The function that will calculate the return value.</param> | |
1741 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1742 <example> | |
1743 <para> | |
1744 The return value is calculated from the value of the actual method invocation arguments. | |
1745 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1746 expression: | |
1747 </para> | |
1748 <code> | |
1749 mock.Setup(x => x.Execute( | |
1750 It.IsAny<int>(), | |
1751 It.IsAny<int>(), | |
1752 It.IsAny<int>(), | |
1753 It.IsAny<int>(), | |
1754 It.IsAny<int>(), | |
1755 It.IsAny<int>())) | |
1756 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6); | |
1757 </code> | |
1758 </example> | |
1759 </member> | |
1760 <member name="M:Moq.Language.IReturns`2.Returns``7(System.Func{``0,``1,``2,``3,``4,``5,``6,`1})"> | |
1761 <summary> | |
1762 Specifies a function that will calculate the value to return from the method, | |
1763 retrieving the arguments for the invocation. | |
1764 </summary> | |
1765 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1766 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1767 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1768 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1769 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1770 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1771 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1772 <param name="valueFunction">The function that will calculate the return value.</param> | |
1773 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1774 <example> | |
1775 <para> | |
1776 The return value is calculated from the value of the actual method invocation arguments. | |
1777 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1778 expression: | |
1779 </para> | |
1780 <code> | |
1781 mock.Setup(x => x.Execute( | |
1782 It.IsAny<int>(), | |
1783 It.IsAny<int>(), | |
1784 It.IsAny<int>(), | |
1785 It.IsAny<int>(), | |
1786 It.IsAny<int>(), | |
1787 It.IsAny<int>(), | |
1788 It.IsAny<int>())) | |
1789 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7); | |
1790 </code> | |
1791 </example> | |
1792 </member> | |
1793 <member name="M:Moq.Language.IReturns`2.Returns``8(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,`1})"> | |
1794 <summary> | |
1795 Specifies a function that will calculate the value to return from the method, | |
1796 retrieving the arguments for the invocation. | |
1797 </summary> | |
1798 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1799 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1800 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1801 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1802 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1803 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1804 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1805 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
1806 <param name="valueFunction">The function that will calculate the return value.</param> | |
1807 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1808 <example> | |
1809 <para> | |
1810 The return value is calculated from the value of the actual method invocation arguments. | |
1811 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1812 expression: | |
1813 </para> | |
1814 <code> | |
1815 mock.Setup(x => x.Execute( | |
1816 It.IsAny<int>(), | |
1817 It.IsAny<int>(), | |
1818 It.IsAny<int>(), | |
1819 It.IsAny<int>(), | |
1820 It.IsAny<int>(), | |
1821 It.IsAny<int>(), | |
1822 It.IsAny<int>(), | |
1823 It.IsAny<int>())) | |
1824 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8); | |
1825 </code> | |
1826 </example> | |
1827 </member> | |
1828 <member name="M:Moq.Language.IReturns`2.Returns``9(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,`1})"> | |
1829 <summary> | |
1830 Specifies a function that will calculate the value to return from the method, | |
1831 retrieving the arguments for the invocation. | |
1832 </summary> | |
1833 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1834 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1835 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1836 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1837 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1838 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1839 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1840 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
1841 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
1842 <param name="valueFunction">The function that will calculate the return value.</param> | |
1843 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1844 <example> | |
1845 <para> | |
1846 The return value is calculated from the value of the actual method invocation arguments. | |
1847 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1848 expression: | |
1849 </para> | |
1850 <code> | |
1851 mock.Setup(x => x.Execute( | |
1852 It.IsAny<int>(), | |
1853 It.IsAny<int>(), | |
1854 It.IsAny<int>(), | |
1855 It.IsAny<int>(), | |
1856 It.IsAny<int>(), | |
1857 It.IsAny<int>(), | |
1858 It.IsAny<int>(), | |
1859 It.IsAny<int>(), | |
1860 It.IsAny<int>())) | |
1861 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9); | |
1862 </code> | |
1863 </example> | |
1864 </member> | |
1865 <member name="M:Moq.Language.IReturns`2.Returns``10(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,`1})"> | |
1866 <summary> | |
1867 Specifies a function that will calculate the value to return from the method, | |
1868 retrieving the arguments for the invocation. | |
1869 </summary> | |
1870 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1871 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1872 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1873 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1874 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1875 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1876 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1877 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
1878 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
1879 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
1880 <param name="valueFunction">The function that will calculate the return value.</param> | |
1881 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1882 <example> | |
1883 <para> | |
1884 The return value is calculated from the value of the actual method invocation arguments. | |
1885 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1886 expression: | |
1887 </para> | |
1888 <code> | |
1889 mock.Setup(x => x.Execute( | |
1890 It.IsAny<int>(), | |
1891 It.IsAny<int>(), | |
1892 It.IsAny<int>(), | |
1893 It.IsAny<int>(), | |
1894 It.IsAny<int>(), | |
1895 It.IsAny<int>(), | |
1896 It.IsAny<int>(), | |
1897 It.IsAny<int>(), | |
1898 It.IsAny<int>(), | |
1899 It.IsAny<int>())) | |
1900 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10); | |
1901 </code> | |
1902 </example> | |
1903 </member> | |
1904 <member name="M:Moq.Language.IReturns`2.Returns``11(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,`1})"> | |
1905 <summary> | |
1906 Specifies a function that will calculate the value to return from the method, | |
1907 retrieving the arguments for the invocation. | |
1908 </summary> | |
1909 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1910 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1911 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1912 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1913 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1914 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1915 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1916 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
1917 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
1918 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
1919 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
1920 <param name="valueFunction">The function that will calculate the return value.</param> | |
1921 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1922 <example> | |
1923 <para> | |
1924 The return value is calculated from the value of the actual method invocation arguments. | |
1925 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1926 expression: | |
1927 </para> | |
1928 <code> | |
1929 mock.Setup(x => x.Execute( | |
1930 It.IsAny<int>(), | |
1931 It.IsAny<int>(), | |
1932 It.IsAny<int>(), | |
1933 It.IsAny<int>(), | |
1934 It.IsAny<int>(), | |
1935 It.IsAny<int>(), | |
1936 It.IsAny<int>(), | |
1937 It.IsAny<int>(), | |
1938 It.IsAny<int>(), | |
1939 It.IsAny<int>(), | |
1940 It.IsAny<int>())) | |
1941 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11); | |
1942 </code> | |
1943 </example> | |
1944 </member> | |
1945 <member name="M:Moq.Language.IReturns`2.Returns``12(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,`1})"> | |
1946 <summary> | |
1947 Specifies a function that will calculate the value to return from the method, | |
1948 retrieving the arguments for the invocation. | |
1949 </summary> | |
1950 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1951 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1952 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1953 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1954 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1955 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1956 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
1957 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
1958 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
1959 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
1960 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
1961 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
1962 <param name="valueFunction">The function that will calculate the return value.</param> | |
1963 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
1964 <example> | |
1965 <para> | |
1966 The return value is calculated from the value of the actual method invocation arguments. | |
1967 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
1968 expression: | |
1969 </para> | |
1970 <code> | |
1971 mock.Setup(x => x.Execute( | |
1972 It.IsAny<int>(), | |
1973 It.IsAny<int>(), | |
1974 It.IsAny<int>(), | |
1975 It.IsAny<int>(), | |
1976 It.IsAny<int>(), | |
1977 It.IsAny<int>(), | |
1978 It.IsAny<int>(), | |
1979 It.IsAny<int>(), | |
1980 It.IsAny<int>(), | |
1981 It.IsAny<int>(), | |
1982 It.IsAny<int>(), | |
1983 It.IsAny<int>())) | |
1984 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12); | |
1985 </code> | |
1986 </example> | |
1987 </member> | |
1988 <member name="M:Moq.Language.IReturns`2.Returns``13(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,`1})"> | |
1989 <summary> | |
1990 Specifies a function that will calculate the value to return from the method, | |
1991 retrieving the arguments for the invocation. | |
1992 </summary> | |
1993 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
1994 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
1995 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
1996 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
1997 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
1998 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
1999 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
2000 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
2001 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
2002 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
2003 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
2004 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
2005 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
2006 <param name="valueFunction">The function that will calculate the return value.</param> | |
2007 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
2008 <example> | |
2009 <para> | |
2010 The return value is calculated from the value of the actual method invocation arguments. | |
2011 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
2012 expression: | |
2013 </para> | |
2014 <code> | |
2015 mock.Setup(x => x.Execute( | |
2016 It.IsAny<int>(), | |
2017 It.IsAny<int>(), | |
2018 It.IsAny<int>(), | |
2019 It.IsAny<int>(), | |
2020 It.IsAny<int>(), | |
2021 It.IsAny<int>(), | |
2022 It.IsAny<int>(), | |
2023 It.IsAny<int>(), | |
2024 It.IsAny<int>(), | |
2025 It.IsAny<int>(), | |
2026 It.IsAny<int>(), | |
2027 It.IsAny<int>(), | |
2028 It.IsAny<int>())) | |
2029 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13); | |
2030 </code> | |
2031 </example> | |
2032 </member> | |
2033 <member name="M:Moq.Language.IReturns`2.Returns``14(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,`1})"> | |
2034 <summary> | |
2035 Specifies a function that will calculate the value to return from the method, | |
2036 retrieving the arguments for the invocation. | |
2037 </summary> | |
2038 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
2039 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
2040 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
2041 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
2042 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
2043 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
2044 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
2045 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
2046 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
2047 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
2048 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
2049 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
2050 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
2051 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam> | |
2052 <param name="valueFunction">The function that will calculate the return value.</param> | |
2053 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
2054 <example> | |
2055 <para> | |
2056 The return value is calculated from the value of the actual method invocation arguments. | |
2057 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
2058 expression: | |
2059 </para> | |
2060 <code> | |
2061 mock.Setup(x => x.Execute( | |
2062 It.IsAny<int>(), | |
2063 It.IsAny<int>(), | |
2064 It.IsAny<int>(), | |
2065 It.IsAny<int>(), | |
2066 It.IsAny<int>(), | |
2067 It.IsAny<int>(), | |
2068 It.IsAny<int>(), | |
2069 It.IsAny<int>(), | |
2070 It.IsAny<int>(), | |
2071 It.IsAny<int>(), | |
2072 It.IsAny<int>(), | |
2073 It.IsAny<int>(), | |
2074 It.IsAny<int>(), | |
2075 It.IsAny<int>())) | |
2076 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14); | |
2077 </code> | |
2078 </example> | |
2079 </member> | |
2080 <member name="M:Moq.Language.IReturns`2.Returns``15(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,`1})"> | |
2081 <summary> | |
2082 Specifies a function that will calculate the value to return from the method, | |
2083 retrieving the arguments for the invocation. | |
2084 </summary> | |
2085 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
2086 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
2087 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
2088 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
2089 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
2090 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
2091 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
2092 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
2093 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
2094 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
2095 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
2096 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
2097 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
2098 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam> | |
2099 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam> | |
2100 <param name="valueFunction">The function that will calculate the return value.</param> | |
2101 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
2102 <example> | |
2103 <para> | |
2104 The return value is calculated from the value of the actual method invocation arguments. | |
2105 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
2106 expression: | |
2107 </para> | |
2108 <code> | |
2109 mock.Setup(x => x.Execute( | |
2110 It.IsAny<int>(), | |
2111 It.IsAny<int>(), | |
2112 It.IsAny<int>(), | |
2113 It.IsAny<int>(), | |
2114 It.IsAny<int>(), | |
2115 It.IsAny<int>(), | |
2116 It.IsAny<int>(), | |
2117 It.IsAny<int>(), | |
2118 It.IsAny<int>(), | |
2119 It.IsAny<int>(), | |
2120 It.IsAny<int>(), | |
2121 It.IsAny<int>(), | |
2122 It.IsAny<int>(), | |
2123 It.IsAny<int>(), | |
2124 It.IsAny<int>())) | |
2125 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15); | |
2126 </code> | |
2127 </example> | |
2128 </member> | |
2129 <member name="M:Moq.Language.IReturns`2.Returns``16(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15,`1})"> | |
2130 <summary> | |
2131 Specifies a function that will calculate the value to return from the method, | |
2132 retrieving the arguments for the invocation. | |
2133 </summary> | |
2134 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam> | |
2135 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam> | |
2136 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam> | |
2137 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam> | |
2138 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam> | |
2139 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam> | |
2140 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam> | |
2141 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam> | |
2142 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam> | |
2143 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam> | |
2144 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam> | |
2145 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam> | |
2146 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam> | |
2147 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam> | |
2148 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam> | |
2149 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam> | |
2150 <param name="valueFunction">The function that will calculate the return value.</param> | |
2151 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return> | |
2152 <example> | |
2153 <para> | |
2154 The return value is calculated from the value of the actual method invocation arguments. | |
2155 Notice how the arguments are retrieved by simply declaring them as part of the lambda | |
2156 expression: | |
2157 </para> | |
2158 <code> | |
2159 mock.Setup(x => x.Execute( | |
2160 It.IsAny<int>(), | |
2161 It.IsAny<int>(), | |
2162 It.IsAny<int>(), | |
2163 It.IsAny<int>(), | |
2164 It.IsAny<int>(), | |
2165 It.IsAny<int>(), | |
2166 It.IsAny<int>(), | |
2167 It.IsAny<int>(), | |
2168 It.IsAny<int>(), | |
2169 It.IsAny<int>(), | |
2170 It.IsAny<int>(), | |
2171 It.IsAny<int>(), | |
2172 It.IsAny<int>(), | |
2173 It.IsAny<int>(), | |
2174 It.IsAny<int>(), | |
2175 It.IsAny<int>())) | |
2176 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16); | |
2177 </code> | |
2178 </example> | |
2179 </member> | |
2180 <member name="T:Moq.Language.ISetupSequentialResult`1"> | |
2181 <summary> | |
2182 Language for ReturnSequence | |
2183 </summary> | |
2184 </member> | |
2185 <member name="M:Moq.Language.ISetupSequentialResult`1.Returns(`0)"> | |
2186 <summary> | |
2187 Returns value | |
2188 </summary> | |
2189 </member> | |
2190 <member name="M:Moq.Language.ISetupSequentialResult`1.Throws(System.Exception)"> | |
2191 <summary> | |
2192 Throws an exception | |
2193 </summary> | |
2194 </member> | |
2195 <member name="M:Moq.Language.ISetupSequentialResult`1.Throws``1"> | |
2196 <summary> | |
2197 Throws an exception | |
2198 </summary> | |
2199 </member> | |
2200 <member name="F:Moq.Linq.FluentMockVisitor.isFirst"> | |
2201 <summary> | |
2202 The first method call or member access will be the | |
2203 last segment of the expression (depth-first traversal), | |
2204 which is the one we have to Setup rather than FluentMock. | |
2205 And the last one is the one we have to Mock.Get rather | |
2206 than FluentMock. | |
2207 </summary> | |
2208 </member> | |
2209 <member name="T:Moq.Mock"> | |
2210 <summary> | |
2211 Base class for mocks and static helper class with methods that | |
2212 apply to mocked objects, such as <see cref="M:Moq.Mock.Get``1(``0)"/> to | |
2213 retrieve a <see cref="T:Moq.Mock`1"/> from an object instance. | |
2214 </summary> | |
2215 </member> | |
2216 <member name="M:Moq.Mock.Of``1"> | |
2217 <summary> | |
2218 Creates an mock object of the indicated type. | |
2219 </summary> | |
2220 <typeparam name="T">The type of the mocked object.</typeparam> | |
2221 <returns>The mocked object created.</returns> | |
2222 </member> | |
2223 <member name="M:Moq.Mock.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})"> | |
2224 <summary> | |
2225 Creates an mock object of the indicated type. | |
2226 </summary> | |
2227 <param name="predicate">The predicate with the specification of how the mocked object should behave.</param> | |
2228 <typeparam name="T">The type of the mocked object.</typeparam> | |
2229 <returns>The mocked object created.</returns> | |
2230 </member> | |
2231 <member name="M:Moq.Mock.#ctor"> | |
2232 <summary> | |
2233 Initializes a new instance of the <see cref="T:Moq.Mock"/> class. | |
2234 </summary> | |
2235 </member> | |
2236 <member name="M:Moq.Mock.Get``1(``0)"> | |
2237 <summary> | |
2238 Retrieves the mock object for the given object instance. | |
2239 </summary><typeparam name="T"> | |
2240 Type of the mock to retrieve. Can be omitted as it's inferred | |
2241 from the object instance passed in as the <paramref name="mocked"/> instance. | |
2242 </typeparam><param name="mocked">The instance of the mocked object.</param><returns>The mock associated with the mocked object.</returns><exception cref="T:System.ArgumentException"> | |
2243 The received <paramref name="mocked"/> instance | |
2244 was not created by Moq. | |
2245 </exception><example group="advanced"> | |
2246 The following example shows how to add a new setup to an object | |
2247 instance which is not the original <see cref="T:Moq.Mock`1"/> but rather | |
2248 the object associated with it: | |
2249 <code> | |
2250 // Typed instance, not the mock, is retrieved from some test API. | |
2251 HttpContextBase context = GetMockContext(); | |
2252 | |
2253 // context.Request is the typed object from the "real" API | |
2254 // so in order to add a setup to it, we need to get | |
2255 // the mock that "owns" it | |
2256 Mock<HttpRequestBase> request = Mock.Get(context.Request); | |
2257 mock.Setup(req => req.AppRelativeCurrentExecutionFilePath) | |
2258 .Returns(tempUrl); | |
2259 </code> | |
2260 </example> | |
2261 </member> | |
2262 <member name="M:Moq.Mock.OnGetObject"> | |
2263 <summary> | |
2264 Returns the mocked object value. | |
2265 </summary> | |
2266 </member> | |
2267 <member name="M:Moq.Mock.Verify"> | |
2268 <summary> | |
2269 Verifies that all verifiable expectations have been met. | |
2270 </summary><example group="verification"> | |
2271 This example sets up an expectation and marks it as verifiable. After | |
2272 the mock is used, a <c>Verify()</c> call is issued on the mock | |
2273 to ensure the method in the setup was invoked: | |
2274 <code> | |
2275 var mock = new Mock<IWarehouse>(); | |
2276 this.Setup(x => x.HasInventory(TALISKER, 50)).Verifiable().Returns(true); | |
2277 ... | |
2278 // other test code | |
2279 ... | |
2280 // Will throw if the test code has didn't call HasInventory. | |
2281 this.Verify(); | |
2282 </code> | |
2283 </example><exception cref="T:Moq.MockException">Not all verifiable expectations were met.</exception> | |
2284 </member> | |
2285 <member name="M:Moq.Mock.VerifyAll"> | |
2286 <summary> | |
2287 Verifies all expectations regardless of whether they have | |
2288 been flagged as verifiable. | |
2289 </summary><example group="verification"> | |
2290 This example sets up an expectation without marking it as verifiable. After | |
2291 the mock is used, a <see cref="M:Moq.Mock.VerifyAll"/> call is issued on the mock | |
2292 to ensure that all expectations are met: | |
2293 <code> | |
2294 var mock = new Mock<IWarehouse>(); | |
2295 this.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); | |
2296 ... | |
2297 // other test code | |
2298 ... | |
2299 // Will throw if the test code has didn't call HasInventory, even | |
2300 // that expectation was not marked as verifiable. | |
2301 this.VerifyAll(); | |
2302 </code> | |
2303 </example><exception cref="T:Moq.MockException">At least one expectation was not met.</exception> | |
2304 </member> | |
2305 <member name="M:Moq.Mock.GetInterceptor(System.Linq.Expressions.Expression,Moq.Mock)"> | |
2306 <summary> | |
2307 Gets the interceptor target for the given expression and root mock, | |
2308 building the intermediate hierarchy of mock objects if necessary. | |
2309 </summary> | |
2310 </member> | |
2311 <member name="M:Moq.Mock.DoRaise(System.Reflection.EventInfo,System.EventArgs)"> | |
2312 <summary> | |
2313 Raises the associated event with the given | |
2314 event argument data. | |
2315 </summary> | |
2316 </member> | |
2317 <member name="M:Moq.Mock.DoRaise(System.Reflection.EventInfo,System.Object[])"> | |
2318 <summary> | |
2319 Raises the associated event with the given | |
2320 event argument data. | |
2321 </summary> | |
2322 </member> | |
2323 <member name="M:Moq.Mock.As``1"> | |
2324 <summary> | |
2325 Adds an interface implementation to the mock, | |
2326 allowing setups to be specified for it. | |
2327 </summary><remarks> | |
2328 This method can only be called before the first use | |
2329 of the mock <see cref="P:Moq.Mock.Object"/> property, at which | |
2330 point the runtime type has already been generated | |
2331 and no more interfaces can be added to it. | |
2332 <para> | |
2333 Also, <typeparamref name="TInterface"/> must be an | |
2334 interface and not a class, which must be specified | |
2335 when creating the mock instead. | |
2336 </para> | |
2337 </remarks><exception cref="T:System.InvalidOperationException"> | |
2338 The mock type | |
2339 has already been generated by accessing the <see cref="P:Moq.Mock.Object"/> property. | |
2340 </exception><exception cref="T:System.ArgumentException"> | |
2341 The <typeparamref name="TInterface"/> specified | |
2342 is not an interface. | |
2343 </exception><example> | |
2344 The following example creates a mock for the main interface | |
2345 and later adds <see cref="T:System.IDisposable"/> to it to verify | |
2346 it's called by the consumer code: | |
2347 <code> | |
2348 var mock = new Mock<IProcessor>(); | |
2349 mock.Setup(x => x.Execute("ping")); | |
2350 | |
2351 // add IDisposable interface | |
2352 var disposable = mock.As<IDisposable>(); | |
2353 disposable.Setup(d => d.Dispose()).Verifiable(); | |
2354 </code> | |
2355 </example><typeparam name="TInterface">Type of interface to cast the mock to.</typeparam> | |
2356 </member> | |
2357 <member name="M:Moq.Mock.SetReturnsDefault``1(``0)"> | |
2358 <!-- No matching elements were found for the following include tag --><include file="Mock.Generic.xdoc" path="docs/doc[@for="Mock.SetReturnDefault{TReturn}"]/*"/> | |
2359 </member> | |
2360 <member name="P:Moq.Mock.Behavior"> | |
2361 <summary> | |
2362 Behavior of the mock, according to the value set in the constructor. | |
2363 </summary> | |
2364 </member> | |
2365 <member name="P:Moq.Mock.CallBase"> | |
2366 <summary> | |
2367 Whether the base member virtual implementation will be called | |
2368 for mocked classes if no setup is matched. Defaults to <see langword="false"/>. | |
2369 </summary> | |
2370 </member> | |
2371 <member name="P:Moq.Mock.DefaultValue"> | |
2372 <summary> | |
2373 Specifies the behavior to use when returning default values for | |
2374 unexpected invocations on loose mocks. | |
2375 </summary> | |
2376 </member> | |
2377 <member name="P:Moq.Mock.Object"> | |
2378 <summary> | |
2379 Gets the mocked object instance. | |
2380 </summary> | |
2381 </member> | |
2382 <member name="P:Moq.Mock.MockedType"> | |
2383 <summary> | |
2384 Retrieves the type of the mocked object, its generic type argument. | |
2385 This is used in the auto-mocking of hierarchy access. | |
2386 </summary> | |
2387 </member> | |
2388 <member name="P:Moq.Mock.DefaultValueProvider"> | |
2389 <summary> | |
2390 Specifies the class that will determine the default | |
2391 value to return when invocations are made that | |
2392 have no setups and need to return a default | |
2393 value (for loose mocks). | |
2394 </summary> | |
2395 </member> | |
2396 <member name="P:Moq.Mock.ImplementedInterfaces"> | |
2397 <summary> | |
2398 Exposes the list of extra interfaces implemented by the mock. | |
2399 </summary> | |
2400 </member> | |
2401 <member name="T:Moq.MockRepository"> | |
2402 <summary> | |
2403 Utility repository class to use to construct multiple | |
2404 mocks when consistent verification is | |
2405 desired for all of them. | |
2406 </summary> | |
2407 <remarks> | |
2408 If multiple mocks will be created during a test, passing | |
2409 the desired <see cref="T:Moq.MockBehavior"/> (if different than the | |
2410 <see cref="F:Moq.MockBehavior.Default"/> or the one | |
2411 passed to the repository constructor) and later verifying each | |
2412 mock can become repetitive and tedious. | |
2413 <para> | |
2414 This repository class helps in that scenario by providing a | |
2415 simplified creation of multiple mocks with a default | |
2416 <see cref="T:Moq.MockBehavior"/> (unless overriden by calling | |
2417 <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/>) and posterior verification. | |
2418 </para> | |
2419 </remarks> | |
2420 <example group="repository"> | |
2421 The following is a straightforward example on how to | |
2422 create and automatically verify strict mocks using a <see cref="T:Moq.MockRepository"/>: | |
2423 <code> | |
2424 var repository = new MockRepository(MockBehavior.Strict); | |
2425 | |
2426 var foo = repository.Create<IFoo>(); | |
2427 var bar = repository.Create<IBar>(); | |
2428 | |
2429 // no need to call Verifiable() on the setup | |
2430 // as we'll be validating all of them anyway. | |
2431 foo.Setup(f => f.Do()); | |
2432 bar.Setup(b => b.Redo()); | |
2433 | |
2434 // exercise the mocks here | |
2435 | |
2436 repository.VerifyAll(); | |
2437 // At this point all setups are already checked | |
2438 // and an optional MockException might be thrown. | |
2439 // Note also that because the mocks are strict, any invocation | |
2440 // that doesn't have a matching setup will also throw a MockException. | |
2441 </code> | |
2442 The following examples shows how to setup the repository | |
2443 to create loose mocks and later verify only verifiable setups: | |
2444 <code> | |
2445 var repository = new MockRepository(MockBehavior.Loose); | |
2446 | |
2447 var foo = repository.Create<IFoo>(); | |
2448 var bar = repository.Create<IBar>(); | |
2449 | |
2450 // this setup will be verified when we verify the repository | |
2451 foo.Setup(f => f.Do()).Verifiable(); | |
2452 | |
2453 // this setup will NOT be verified | |
2454 foo.Setup(f => f.Calculate()); | |
2455 | |
2456 // this setup will be verified when we verify the repository | |
2457 bar.Setup(b => b.Redo()).Verifiable(); | |
2458 | |
2459 // exercise the mocks here | |
2460 // note that because the mocks are Loose, members | |
2461 // called in the interfaces for which no matching | |
2462 // setups exist will NOT throw exceptions, | |
2463 // and will rather return default values. | |
2464 | |
2465 repository.Verify(); | |
2466 // At this point verifiable setups are already checked | |
2467 // and an optional MockException might be thrown. | |
2468 </code> | |
2469 The following examples shows how to setup the repository with a | |
2470 default strict behavior, overriding that default for a | |
2471 specific mock: | |
2472 <code> | |
2473 var repository = new MockRepository(MockBehavior.Strict); | |
2474 | |
2475 // this particular one we want loose | |
2476 var foo = repository.Create<IFoo>(MockBehavior.Loose); | |
2477 var bar = repository.Create<IBar>(); | |
2478 | |
2479 // specify setups | |
2480 | |
2481 // exercise the mocks here | |
2482 | |
2483 repository.Verify(); | |
2484 </code> | |
2485 </example> | |
2486 <seealso cref="T:Moq.MockBehavior"/> | |
2487 </member> | |
2488 <member name="T:Moq.MockFactory"> | |
2489 <summary> | |
2490 Utility factory class to use to construct multiple | |
2491 mocks when consistent verification is | |
2492 desired for all of them. | |
2493 </summary> | |
2494 <remarks> | |
2495 If multiple mocks will be created during a test, passing | |
2496 the desired <see cref="T:Moq.MockBehavior"/> (if different than the | |
2497 <see cref="F:Moq.MockBehavior.Default"/> or the one | |
2498 passed to the factory constructor) and later verifying each | |
2499 mock can become repetitive and tedious. | |
2500 <para> | |
2501 This factory class helps in that scenario by providing a | |
2502 simplified creation of multiple mocks with a default | |
2503 <see cref="T:Moq.MockBehavior"/> (unless overriden by calling | |
2504 <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/>) and posterior verification. | |
2505 </para> | |
2506 </remarks> | |
2507 <example group="factory"> | |
2508 The following is a straightforward example on how to | |
2509 create and automatically verify strict mocks using a <see cref="T:Moq.MockFactory"/>: | |
2510 <code> | |
2511 var factory = new MockFactory(MockBehavior.Strict); | |
2512 | |
2513 var foo = factory.Create<IFoo>(); | |
2514 var bar = factory.Create<IBar>(); | |
2515 | |
2516 // no need to call Verifiable() on the setup | |
2517 // as we'll be validating all of them anyway. | |
2518 foo.Setup(f => f.Do()); | |
2519 bar.Setup(b => b.Redo()); | |
2520 | |
2521 // exercise the mocks here | |
2522 | |
2523 factory.VerifyAll(); | |
2524 // At this point all setups are already checked | |
2525 // and an optional MockException might be thrown. | |
2526 // Note also that because the mocks are strict, any invocation | |
2527 // that doesn't have a matching setup will also throw a MockException. | |
2528 </code> | |
2529 The following examples shows how to setup the factory | |
2530 to create loose mocks and later verify only verifiable setups: | |
2531 <code> | |
2532 var factory = new MockFactory(MockBehavior.Loose); | |
2533 | |
2534 var foo = factory.Create<IFoo>(); | |
2535 var bar = factory.Create<IBar>(); | |
2536 | |
2537 // this setup will be verified when we verify the factory | |
2538 foo.Setup(f => f.Do()).Verifiable(); | |
2539 | |
2540 // this setup will NOT be verified | |
2541 foo.Setup(f => f.Calculate()); | |
2542 | |
2543 // this setup will be verified when we verify the factory | |
2544 bar.Setup(b => b.Redo()).Verifiable(); | |
2545 | |
2546 // exercise the mocks here | |
2547 // note that because the mocks are Loose, members | |
2548 // called in the interfaces for which no matching | |
2549 // setups exist will NOT throw exceptions, | |
2550 // and will rather return default values. | |
2551 | |
2552 factory.Verify(); | |
2553 // At this point verifiable setups are already checked | |
2554 // and an optional MockException might be thrown. | |
2555 </code> | |
2556 The following examples shows how to setup the factory with a | |
2557 default strict behavior, overriding that default for a | |
2558 specific mock: | |
2559 <code> | |
2560 var factory = new MockFactory(MockBehavior.Strict); | |
2561 | |
2562 // this particular one we want loose | |
2563 var foo = factory.Create<IFoo>(MockBehavior.Loose); | |
2564 var bar = factory.Create<IBar>(); | |
2565 | |
2566 // specify setups | |
2567 | |
2568 // exercise the mocks here | |
2569 | |
2570 factory.Verify(); | |
2571 </code> | |
2572 </example> | |
2573 <seealso cref="T:Moq.MockBehavior"/> | |
2574 </member> | |
2575 <member name="M:Moq.MockFactory.#ctor(Moq.MockBehavior)"> | |
2576 <summary> | |
2577 Initializes the factory with the given <paramref name="defaultBehavior"/> | |
2578 for newly created mocks from the factory. | |
2579 </summary> | |
2580 <param name="defaultBehavior">The behavior to use for mocks created | |
2581 using the <see cref="M:Moq.MockFactory.Create``1"/> factory method if not overriden | |
2582 by using the <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/> overload.</param> | |
2583 </member> | |
2584 <member name="M:Moq.MockFactory.Create``1"> | |
2585 <summary> | |
2586 Creates a new mock with the default <see cref="T:Moq.MockBehavior"/> | |
2587 specified at factory construction time. | |
2588 </summary> | |
2589 <typeparam name="T">Type to mock.</typeparam> | |
2590 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns> | |
2591 <example ignore="true"> | |
2592 <code> | |
2593 var factory = new MockFactory(MockBehavior.Strict); | |
2594 | |
2595 var foo = factory.Create<IFoo>(); | |
2596 // use mock on tests | |
2597 | |
2598 factory.VerifyAll(); | |
2599 </code> | |
2600 </example> | |
2601 </member> | |
2602 <member name="M:Moq.MockFactory.Create``1(System.Object[])"> | |
2603 <summary> | |
2604 Creates a new mock with the default <see cref="T:Moq.MockBehavior"/> | |
2605 specified at factory construction time and with the | |
2606 the given constructor arguments for the class. | |
2607 </summary> | |
2608 <remarks> | |
2609 The mock will try to find the best match constructor given the | |
2610 constructor arguments, and invoke that to initialize the instance. | |
2611 This applies only to classes, not interfaces. | |
2612 </remarks> | |
2613 <typeparam name="T">Type to mock.</typeparam> | |
2614 <param name="args">Constructor arguments for mocked classes.</param> | |
2615 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns> | |
2616 <example ignore="true"> | |
2617 <code> | |
2618 var factory = new MockFactory(MockBehavior.Default); | |
2619 | |
2620 var mock = factory.Create<MyBase>("Foo", 25, true); | |
2621 // use mock on tests | |
2622 | |
2623 factory.Verify(); | |
2624 </code> | |
2625 </example> | |
2626 </member> | |
2627 <member name="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"> | |
2628 <summary> | |
2629 Creates a new mock with the given <paramref name="behavior"/>. | |
2630 </summary> | |
2631 <typeparam name="T">Type to mock.</typeparam> | |
2632 <param name="behavior">Behavior to use for the mock, which overrides | |
2633 the default behavior specified at factory construction time.</param> | |
2634 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns> | |
2635 <example group="factory"> | |
2636 The following example shows how to create a mock with a different | |
2637 behavior to that specified as the default for the factory: | |
2638 <code> | |
2639 var factory = new MockFactory(MockBehavior.Strict); | |
2640 | |
2641 var foo = factory.Create<IFoo>(MockBehavior.Loose); | |
2642 </code> | |
2643 </example> | |
2644 </member> | |
2645 <member name="M:Moq.MockFactory.Create``1(Moq.MockBehavior,System.Object[])"> | |
2646 <summary> | |
2647 Creates a new mock with the given <paramref name="behavior"/> | |
2648 and with the the given constructor arguments for the class. | |
2649 </summary> | |
2650 <remarks> | |
2651 The mock will try to find the best match constructor given the | |
2652 constructor arguments, and invoke that to initialize the instance. | |
2653 This applies only to classes, not interfaces. | |
2654 </remarks> | |
2655 <typeparam name="T">Type to mock.</typeparam> | |
2656 <param name="behavior">Behavior to use for the mock, which overrides | |
2657 the default behavior specified at factory construction time.</param> | |
2658 <param name="args">Constructor arguments for mocked classes.</param> | |
2659 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns> | |
2660 <example group="factory"> | |
2661 The following example shows how to create a mock with a different | |
2662 behavior to that specified as the default for the factory, passing | |
2663 constructor arguments: | |
2664 <code> | |
2665 var factory = new MockFactory(MockBehavior.Default); | |
2666 | |
2667 var mock = factory.Create<MyBase>(MockBehavior.Strict, "Foo", 25, true); | |
2668 </code> | |
2669 </example> | |
2670 </member> | |
2671 <member name="M:Moq.MockFactory.CreateMock``1(Moq.MockBehavior,System.Object[])"> | |
2672 <summary> | |
2673 Implements creation of a new mock within the factory. | |
2674 </summary> | |
2675 <typeparam name="T">Type to mock.</typeparam> | |
2676 <param name="behavior">The behavior for the new mock.</param> | |
2677 <param name="args">Optional arguments for the construction of the mock.</param> | |
2678 </member> | |
2679 <member name="M:Moq.MockFactory.Verify"> | |
2680 <summary> | |
2681 Verifies all verifiable expectations on all mocks created | |
2682 by this factory. | |
2683 </summary> | |
2684 <seealso cref="M:Moq.Mock.Verify"/> | |
2685 <exception cref="T:Moq.MockException">One or more mocks had expectations that were not satisfied.</exception> | |
2686 </member> | |
2687 <member name="M:Moq.MockFactory.VerifyAll"> | |
2688 <summary> | |
2689 Verifies all verifiable expectations on all mocks created | |
2690 by this factory. | |
2691 </summary> | |
2692 <seealso cref="M:Moq.Mock.Verify"/> | |
2693 <exception cref="T:Moq.MockException">One or more mocks had expectations that were not satisfied.</exception> | |
2694 </member> | |
2695 <member name="M:Moq.MockFactory.VerifyMocks(System.Action{Moq.Mock})"> | |
2696 <summary> | |
2697 Invokes <paramref name="verifyAction"/> for each mock | |
2698 in <see cref="P:Moq.MockFactory.Mocks"/>, and accumulates the resulting | |
2699 <see cref="T:Moq.MockVerificationException"/> that might be | |
2700 thrown from the action. | |
2701 </summary> | |
2702 <param name="verifyAction">The action to execute against | |
2703 each mock.</param> | |
2704 </member> | |
2705 <member name="P:Moq.MockFactory.CallBase"> | |
2706 <summary> | |
2707 Whether the base member virtual implementation will be called | |
2708 for mocked classes if no setup is matched. Defaults to <see langword="false"/>. | |
2709 </summary> | |
2710 </member> | |
2711 <member name="P:Moq.MockFactory.DefaultValue"> | |
2712 <summary> | |
2713 Specifies the behavior to use when returning default values for | |
2714 unexpected invocations on loose mocks. | |
2715 </summary> | |
2716 </member> | |
2717 <member name="P:Moq.MockFactory.Mocks"> | |
2718 <summary> | |
2719 Gets the mocks that have been created by this factory and | |
2720 that will get verified together. | |
2721 </summary> | |
2722 </member> | |
2723 <member name="M:Moq.MockRepository.Of``1"> | |
2724 <summary> | |
2725 Access the universe of mocks of the given type, to retrieve those | |
2726 that behave according to the LINQ query specification. | |
2727 </summary> | |
2728 <typeparam name="T">The type of the mocked object to query.</typeparam> | |
2729 </member> | |
2730 <member name="M:Moq.MockRepository.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})"> | |
2731 <summary> | |
2732 Access the universe of mocks of the given type, to retrieve those | |
2733 that behave according to the LINQ query specification. | |
2734 </summary> | |
2735 <param name="specification">The predicate with the setup expressions.</param> | |
2736 <typeparam name="T">The type of the mocked object to query.</typeparam> | |
2737 </member> | |
2738 <member name="M:Moq.MockRepository.OneOf``1"> | |
2739 <summary> | |
2740 Creates an mock object of the indicated type. | |
2741 </summary> | |
2742 <typeparam name="T">The type of the mocked object.</typeparam> | |
2743 <returns>The mocked object created.</returns> | |
2744 </member> | |
2745 <member name="M:Moq.MockRepository.OneOf``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})"> | |
2746 <summary> | |
2747 Creates an mock object of the indicated type. | |
2748 </summary> | |
2749 <param name="specification">The predicate with the setup expressions.</param> | |
2750 <typeparam name="T">The type of the mocked object.</typeparam> | |
2751 <returns>The mocked object created.</returns> | |
2752 </member> | |
2753 <member name="M:Moq.MockRepository.CreateMockQuery``1"> | |
2754 <summary> | |
2755 Creates the mock query with the underlying queriable implementation. | |
2756 </summary> | |
2757 </member> | |
2758 <member name="M:Moq.MockRepository.CreateQueryable``1"> | |
2759 <summary> | |
2760 Wraps the enumerator inside a queryable. | |
2761 </summary> | |
2762 </member> | |
2763 <member name="M:Moq.MockRepository.CreateMocks``1"> | |
2764 <summary> | |
2765 Method that is turned into the actual call from .Query{T}, to | |
2766 transform the queryable query into a normal enumerable query. | |
2767 This method is never used directly by consumers. | |
2768 </summary> | |
2769 </member> | |
2770 <member name="M:Moq.MockRepository.#ctor(Moq.MockBehavior)"> | |
2771 <summary> | |
2772 Initializes the repository with the given <paramref name="defaultBehavior"/> | |
2773 for newly created mocks from the repository. | |
2774 </summary> | |
2775 <param name="defaultBehavior">The behavior to use for mocks created | |
2776 using the <see cref="M:Moq.MockFactory.Create``1"/> repository method if not overriden | |
2777 by using the <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/> overload.</param> | |
2778 </member> | |
2779 <member name="T:Moq.EmptyDefaultValueProvider"> | |
2780 <summary> | |
2781 A <see cref="T:Moq.IDefaultValueProvider"/> that returns an empty default value | |
2782 for invocations that do not have setups or return values, with loose mocks. | |
2783 This is the default behavior for a mock. | |
2784 </summary> | |
2785 </member> | |
2786 <member name="T:Moq.IDefaultValueProvider"> | |
2787 <summary> | |
2788 Interface to be implemented by classes that determine the | |
2789 default value of non-expected invocations. | |
2790 </summary> | |
2791 </member> | |
2792 <member name="M:Moq.IDefaultValueProvider.DefineDefault``1(``0)"> | |
2793 <summary> | |
2794 Defines the default value to return in all the methods returning <typeparamref name="T"/>. | |
2795 </summary><typeparam name="T">The type of the return value.</typeparam><param name="value">The value to set as default.</param> | |
2796 </member> | |
2797 <member name="M:Moq.IDefaultValueProvider.ProvideDefault(System.Reflection.MethodInfo)"> | |
2798 <summary> | |
2799 Provides a value for the given member and arguments. | |
2800 </summary><param name="member"> | |
2801 The member to provide a default value for. | |
2802 </param> | |
2803 </member> | |
2804 <member name="T:Moq.ExpressionStringBuilder"> | |
2805 <summary> | |
2806 The intention of <see cref="T:Moq.ExpressionStringBuilder"/> is to create a more readable | |
2807 string representation for the failure message. | |
2808 </summary> | |
2809 </member> | |
2810 <member name="T:Moq.Language.Flow.ICallbackResult"> | |
2811 <summary> | |
2812 Implements the fluent API. | |
2813 </summary> | |
2814 </member> | |
2815 <member name="T:Moq.Language.IThrows"> | |
2816 <summary> | |
2817 Defines the <c>Throws</c> verb. | |
2818 </summary> | |
2819 </member> | |
2820 <member name="M:Moq.Language.IThrows.Throws(System.Exception)"> | |
2821 <summary> | |
2822 Specifies the exception to throw when the method is invoked. | |
2823 </summary> | |
2824 <param name="exception">Exception instance to throw.</param> | |
2825 <example> | |
2826 This example shows how to throw an exception when the method is | |
2827 invoked with an empty string argument: | |
2828 <code> | |
2829 mock.Setup(x => x.Execute("")) | |
2830 .Throws(new ArgumentException()); | |
2831 </code> | |
2832 </example> | |
2833 </member> | |
2834 <member name="M:Moq.Language.IThrows.Throws``1"> | |
2835 <summary> | |
2836 Specifies the type of exception to throw when the method is invoked. | |
2837 </summary> | |
2838 <typeparam name="TException">Type of exception to instantiate and throw when the setup is matched.</typeparam> | |
2839 <example> | |
2840 This example shows how to throw an exception when the method is | |
2841 invoked with an empty string argument: | |
2842 <code> | |
2843 mock.Setup(x => x.Execute("")) | |
2844 .Throws<ArgumentException>(); | |
2845 </code> | |
2846 </example> | |
2847 </member> | |
2848 <member name="T:Moq.Language.Flow.IThrowsResult"> | |
2849 <summary> | |
2850 Implements the fluent API. | |
2851 </summary> | |
2852 </member> | |
2853 <member name="T:Moq.Language.IOccurrence"> | |
2854 <summary> | |
2855 Defines occurrence members to constraint setups. | |
2856 </summary> | |
2857 </member> | |
2858 <member name="M:Moq.Language.IOccurrence.AtMostOnce"> | |
2859 <summary> | |
2860 The expected invocation can happen at most once. | |
2861 </summary> | |
2862 <example> | |
2863 <code> | |
2864 var mock = new Mock<ICommand>(); | |
2865 mock.Setup(foo => foo.Execute("ping")) | |
2866 .AtMostOnce(); | |
2867 </code> | |
2868 </example> | |
2869 </member> | |
2870 <member name="M:Moq.Language.IOccurrence.AtMost(System.Int32)"> | |
2871 <summary> | |
2872 The expected invocation can happen at most specified number of times. | |
2873 </summary> | |
2874 <param name="callCount">The number of times to accept calls.</param> | |
2875 <example> | |
2876 <code> | |
2877 var mock = new Mock<ICommand>(); | |
2878 mock.Setup(foo => foo.Execute("ping")) | |
2879 .AtMost( 5 ); | |
2880 </code> | |
2881 </example> | |
2882 </member> | |
2883 <member name="T:Moq.Language.IVerifies"> | |
2884 <summary> | |
2885 Defines the <c>Verifiable</c> verb. | |
2886 </summary> | |
2887 </member> | |
2888 <member name="M:Moq.Language.IVerifies.Verifiable"> | |
2889 <summary> | |
2890 Marks the expectation as verifiable, meaning that a call | |
2891 to <see cref="M:Moq.Mock.Verify"/> will check if this particular | |
2892 expectation was met. | |
2893 </summary> | |
2894 <example> | |
2895 The following example marks the expectation as verifiable: | |
2896 <code> | |
2897 mock.Expect(x => x.Execute("ping")) | |
2898 .Returns(true) | |
2899 .Verifiable(); | |
2900 </code> | |
2901 </example> | |
2902 </member> | |
2903 <member name="M:Moq.Language.IVerifies.Verifiable(System.String)"> | |
2904 <summary> | |
2905 Marks the expectation as verifiable, meaning that a call | |
2906 to <see cref="M:Moq.Mock.Verify"/> will check if this particular | |
2907 expectation was met, and specifies a message for failures. | |
2908 </summary> | |
2909 <example> | |
2910 The following example marks the expectation as verifiable: | |
2911 <code> | |
2912 mock.Expect(x => x.Execute("ping")) | |
2913 .Returns(true) | |
2914 .Verifiable("Ping should be executed always!"); | |
2915 </code> | |
2916 </example> | |
2917 </member> | |
2918 <member name="T:Moq.Language.Flow.ISetup`1"> | |
2919 <summary> | |
2920 Implements the fluent API. | |
2921 </summary> | |
2922 </member> | |
2923 <member name="T:Moq.MethodCallReturn"> | |
2924 <devdoc> | |
2925 We need this non-generics base class so that | |
2926 we can use <see cref="P:Moq.MethodCallReturn.HasReturnValue"/> from | |
2927 generic code. | |
2928 </devdoc> | |
2929 </member> | |
2930 <member name="T:Moq.Language.Flow.ISetup`2"> | |
2931 <summary> | |
2932 Implements the fluent API. | |
2933 </summary> | |
2934 </member> | |
2935 <member name="T:Moq.Language.Flow.IReturnsThrows`2"> | |
2936 <summary> | |
2937 Implements the fluent API. | |
2938 </summary> | |
2939 </member> | |
2940 <member name="T:Moq.Language.Flow.ISetupGetter`2"> | |
2941 <summary> | |
2942 Implements the fluent API. | |
2943 </summary> | |
2944 </member> | |
2945 <member name="T:Moq.Language.ICallbackGetter`2"> | |
2946 <summary> | |
2947 Defines the <c>Callback</c> verb for property getter setups. | |
2948 </summary> | |
2949 <seealso cref="M:Moq.Mock`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"/> | |
2950 <typeparam name="TMock">Mocked type.</typeparam> | |
2951 <typeparam name="TProperty">Type of the property.</typeparam> | |
2952 </member> | |
2953 <member name="M:Moq.Language.ICallbackGetter`2.Callback(System.Action)"> | |
2954 <summary> | |
2955 Specifies a callback to invoke when the property is retrieved. | |
2956 </summary> | |
2957 <param name="action">Callback method to invoke.</param> | |
2958 <example> | |
2959 Invokes the given callback with the property value being set. | |
2960 <code> | |
2961 mock.SetupGet(x => x.Suspended) | |
2962 .Callback(() => called = true) | |
2963 .Returns(true); | |
2964 </code> | |
2965 </example> | |
2966 </member> | |
2967 <member name="T:Moq.Language.Flow.IReturnsThrowsGetter`2"> | |
2968 <summary> | |
2969 Implements the fluent API. | |
2970 </summary> | |
2971 </member> | |
2972 <member name="T:Moq.Language.IReturnsGetter`2"> | |
2973 <summary> | |
2974 Defines the <c>Returns</c> verb for property get setups. | |
2975 </summary> | |
2976 <typeparam name="TMock">Mocked type.</typeparam> | |
2977 <typeparam name="TProperty">Type of the property.</typeparam> | |
2978 </member> | |
2979 <member name="M:Moq.Language.IReturnsGetter`2.Returns(`1)"> | |
2980 <summary> | |
2981 Specifies the value to return. | |
2982 </summary> | |
2983 <param name="value">The value to return, or <see langword="null"/>.</param> | |
2984 <example> | |
2985 Return a <c>true</c> value from the property getter call: | |
2986 <code> | |
2987 mock.SetupGet(x => x.Suspended) | |
2988 .Returns(true); | |
2989 </code> | |
2990 </example> | |
2991 </member> | |
2992 <member name="M:Moq.Language.IReturnsGetter`2.Returns(System.Func{`1})"> | |
2993 <summary> | |
2994 Specifies a function that will calculate the value to return for the property. | |
2995 </summary> | |
2996 <param name="valueFunction">The function that will calculate the return value.</param> | |
2997 <example> | |
2998 Return a calculated value when the property is retrieved: | |
2999 <code> | |
3000 mock.SetupGet(x => x.Suspended) | |
3001 .Returns(() => returnValues[0]); | |
3002 </code> | |
3003 The lambda expression to retrieve the return value is lazy-executed, | |
3004 meaning that its value may change depending on the moment the property | |
3005 is retrieved and the value the <c>returnValues</c> array has at | |
3006 that moment. | |
3007 </example> | |
3008 </member> | |
3009 <member name="T:Moq.Language.Flow.IReturnsResult`1"> | |
3010 <summary> | |
3011 Implements the fluent API. | |
3012 </summary> | |
3013 </member> | |
3014 <member name="T:Moq.MockSequence"> | |
3015 <summary> | |
3016 Helper class to setup a full trace between many mocks | |
3017 </summary> | |
3018 </member> | |
3019 <member name="M:Moq.MockSequence.#ctor"> | |
3020 <summary> | |
3021 Initialize a trace setup | |
3022 </summary> | |
3023 </member> | |
3024 <member name="P:Moq.MockSequence.Cyclic"> | |
3025 <summary> | |
3026 Allow sequence to be repeated | |
3027 </summary> | |
3028 </member> | |
3029 <member name="T:Moq.MockSequenceHelper"> | |
3030 <summary> | |
3031 define nice api | |
3032 </summary> | |
3033 </member> | |
3034 <member name="M:Moq.MockSequenceHelper.InSequence``1(Moq.Mock{``0},Moq.MockSequence)"> | |
3035 <summary> | |
3036 Perform an expectation in the trace. | |
3037 </summary> | |
3038 </member> | |
3039 <member name="T:Moq.MatcherAttribute"> | |
3040 <summary> | |
3041 Marks a method as a matcher, which allows complete replacement | |
3042 of the built-in <see cref="T:Moq.It"/> class with your own argument | |
3043 matching rules. | |
3044 </summary> | |
3045 <remarks> | |
3046 <b>This feature has been deprecated in favor of the new | |
3047 and simpler <see cref="T:Moq.Match`1"/>. | |
3048 </b> | |
3049 <para> | |
3050 The argument matching is used to determine whether a concrete | |
3051 invocation in the mock matches a given setup. This | |
3052 matching mechanism is fully extensible. | |
3053 </para> | |
3054 <para> | |
3055 There are two parts of a matcher: the compiler matcher | |
3056 and the runtime matcher. | |
3057 <list type="bullet"> | |
3058 <item> | |
3059 <term>Compiler matcher</term> | |
3060 <description>Used to satisfy the compiler requirements for the | |
3061 argument. Needs to be a method optionally receiving any arguments | |
3062 you might need for the matching, but with a return type that | |
3063 matches that of the argument. | |
3064 <para> | |
3065 Let's say I want to match a lists of orders that contains | |
3066 a particular one. I might create a compiler matcher like the following: | |
3067 </para> | |
3068 <code> | |
3069 public static class Orders | |
3070 { | |
3071 [Matcher] | |
3072 public static IEnumerable<Order> Contains(Order order) | |
3073 { | |
3074 return null; | |
3075 } | |
3076 } | |
3077 </code> | |
3078 Now we can invoke this static method instead of an argument in an | |
3079 invocation: | |
3080 <code> | |
3081 var order = new Order { ... }; | |
3082 var mock = new Mock<IRepository<Order>>(); | |
3083 | |
3084 mock.Setup(x => x.Save(Orders.Contains(order))) | |
3085 .Throws<ArgumentException>(); | |
3086 </code> | |
3087 Note that the return value from the compiler matcher is irrelevant. | |
3088 This method will never be called, and is just used to satisfy the | |
3089 compiler and to signal Moq that this is not a method that we want | |
3090 to be invoked at runtime. | |
3091 </description> | |
3092 </item> | |
3093 <item> | |
3094 <term>Runtime matcher</term> | |
3095 <description> | |
3096 The runtime matcher is the one that will actually perform evaluation | |
3097 when the test is run, and is defined by convention to have the | |
3098 same signature as the compiler matcher, but where the return | |
3099 value is the first argument to the call, which contains the | |
3100 object received by the actual invocation at runtime: | |
3101 <code> | |
3102 public static bool Contains(IEnumerable<Order> orders, Order order) | |
3103 { | |
3104 return orders.Contains(order); | |
3105 } | |
3106 </code> | |
3107 At runtime, the mocked method will be invoked with a specific | |
3108 list of orders. This value will be passed to this runtime | |
3109 matcher as the first argument, while the second argument is the | |
3110 one specified in the setup (<c>x.Save(Orders.Contains(order))</c>). | |
3111 <para> | |
3112 The boolean returned determines whether the given argument has been | |
3113 matched. If all arguments to the expected method are matched, then | |
3114 the setup matches and is evaluated. | |
3115 </para> | |
3116 </description> | |
3117 </item> | |
3118 </list> | |
3119 </para> | |
3120 Using this extensible infrastructure, you can easily replace the entire | |
3121 <see cref="T:Moq.It"/> set of matchers with your own. You can also avoid the | |
3122 typical (and annoying) lengthy expressions that result when you have | |
3123 multiple arguments that use generics. | |
3124 </remarks> | |
3125 <example> | |
3126 The following is the complete example explained above: | |
3127 <code> | |
3128 public static class Orders | |
3129 { | |
3130 [Matcher] | |
3131 public static IEnumerable<Order> Contains(Order order) | |
3132 { | |
3133 return null; | |
3134 } | |
3135 | |
3136 public static bool Contains(IEnumerable<Order> orders, Order order) | |
3137 { | |
3138 return orders.Contains(order); | |
3139 } | |
3140 } | |
3141 </code> | |
3142 And the concrete test using this matcher: | |
3143 <code> | |
3144 var order = new Order { ... }; | |
3145 var mock = new Mock<IRepository<Order>>(); | |
3146 | |
3147 mock.Setup(x => x.Save(Orders.Contains(order))) | |
3148 .Throws<ArgumentException>(); | |
3149 | |
3150 // use mock, invoke Save, and have the matcher filter. | |
3151 </code> | |
3152 </example> | |
3153 </member> | |
3154 <member name="T:Moq.Mock`1"> | |
3155 <summary> | |
3156 Provides a mock implementation of <typeparamref name="T"/>. | |
3157 </summary><remarks> | |
3158 Any interface type can be used for mocking, but for classes, only abstract and virtual members can be mocked. | |
3159 <para> | |
3160 The behavior of the mock with regards to the setups and the actual calls is determined | |
3161 by the optional <see cref="T:Moq.MockBehavior"/> that can be passed to the <see cref="M:Moq.Mock`1.#ctor(Moq.MockBehavior)"/> | |
3162 constructor. | |
3163 </para> | |
3164 </remarks><typeparam name="T">Type to mock, which can be an interface or a class.</typeparam><example group="overview" order="0"> | |
3165 The following example shows establishing setups with specific values | |
3166 for method invocations: | |
3167 <code> | |
3168 // Arrange | |
3169 var order = new Order(TALISKER, 50); | |
3170 var mock = new Mock<IWarehouse>(); | |
3171 | |
3172 mock.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); | |
3173 | |
3174 // Act | |
3175 order.Fill(mock.Object); | |
3176 | |
3177 // Assert | |
3178 Assert.True(order.IsFilled); | |
3179 </code> | |
3180 The following example shows how to use the <see cref="T:Moq.It"/> class | |
3181 to specify conditions for arguments instead of specific values: | |
3182 <code> | |
3183 // Arrange | |
3184 var order = new Order(TALISKER, 50); | |
3185 var mock = new Mock<IWarehouse>(); | |
3186 | |
3187 // shows how to expect a value within a range | |
3188 mock.Setup(x => x.HasInventory( | |
3189 It.IsAny<string>(), | |
3190 It.IsInRange(0, 100, Range.Inclusive))) | |
3191 .Returns(false); | |
3192 | |
3193 // shows how to throw for unexpected calls. | |
3194 mock.Setup(x => x.Remove( | |
3195 It.IsAny<string>(), | |
3196 It.IsAny<int>())) | |
3197 .Throws(new InvalidOperationException()); | |
3198 | |
3199 // Act | |
3200 order.Fill(mock.Object); | |
3201 | |
3202 // Assert | |
3203 Assert.False(order.IsFilled); | |
3204 </code> | |
3205 </example> | |
3206 </member> | |
3207 <member name="M:Moq.Mock`1.Expect(System.Linq.Expressions.Expression{System.Action{`0}})"> | |
3208 <summary> | |
3209 Obsolete. | |
3210 </summary> | |
3211 </member> | |
3212 <member name="M:Moq.Mock`1.Expect``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"> | |
3213 <summary> | |
3214 Obsolete. | |
3215 </summary> | |
3216 </member> | |
3217 <member name="M:Moq.Mock`1.ExpectGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"> | |
3218 <summary> | |
3219 Obsolete. | |
3220 </summary> | |
3221 </member> | |
3222 <member name="M:Moq.Mock`1.ExpectSet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"> | |
3223 <summary> | |
3224 Obsolete. | |
3225 </summary> | |
3226 </member> | |
3227 <member name="M:Moq.Mock`1.ExpectSet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},``0)"> | |
3228 <summary> | |
3229 Obsolete. | |
3230 </summary> | |
3231 </member> | |
3232 <member name="M:Moq.Mock`1.#ctor(System.Boolean)"> | |
3233 <summary> | |
3234 Ctor invoked by AsTInterface exclusively. | |
3235 </summary> | |
3236 </member> | |
3237 <member name="M:Moq.Mock`1.#ctor"> | |
3238 <summary> | |
3239 Initializes an instance of the mock with <see cref="F:Moq.MockBehavior.Default">default behavior</see>. | |
3240 </summary><example> | |
3241 <code>var mock = new Mock<IFormatProvider>();</code> | |
3242 </example> | |
3243 </member> | |
3244 <member name="M:Moq.Mock`1.#ctor(System.Object[])"> | |
3245 <summary> | |
3246 Initializes an instance of the mock with <see cref="F:Moq.MockBehavior.Default">default behavior</see> and with | |
3247 the given constructor arguments for the class. (Only valid when <typeparamref name="T"/> is a class) | |
3248 </summary><remarks> | |
3249 The mock will try to find the best match constructor given the constructor arguments, and invoke that | |
3250 to initialize the instance. This applies only for classes, not interfaces. | |
3251 </remarks><example> | |
3252 <code>var mock = new Mock<MyProvider>(someArgument, 25);</code> | |
3253 </example><param name="args">Optional constructor arguments if the mocked type is a class.</param> | |
3254 </member> | |
3255 <member name="M:Moq.Mock`1.#ctor(Moq.MockBehavior)"> | |
3256 <summary> | |
3257 Initializes an instance of the mock with the specified <see cref="T:Moq.MockBehavior">behavior</see>. | |
3258 </summary><example> | |
3259 <code>var mock = new Mock<IFormatProvider>(MockBehavior.Relaxed);</code> | |
3260 </example><param name="behavior">Behavior of the mock.</param> | |
3261 </member> | |
3262 <member name="M:Moq.Mock`1.#ctor(Moq.MockBehavior,System.Object[])"> | |
3263 <summary> | |
3264 Initializes an instance of the mock with a specific <see cref="T:Moq.MockBehavior">behavior</see> with | |
3265 the given constructor arguments for the class. | |
3266 </summary><remarks> | |
3267 The mock will try to find the best match constructor given the constructor arguments, and invoke that | |
3268 to initialize the instance. This applies only to classes, not interfaces. | |
3269 </remarks><example> | |
3270 <code>var mock = new Mock<MyProvider>(someArgument, 25);</code> | |
3271 </example><param name="behavior">Behavior of the mock.</param><param name="args">Optional constructor arguments if the mocked type is a class.</param> | |
3272 </member> | |
3273 <member name="M:Moq.Mock`1.OnGetObject"> | |
3274 <summary> | |
3275 Returns the mocked object value. | |
3276 </summary> | |
3277 </member> | |
3278 <member name="M:Moq.Mock`1.Setup(System.Linq.Expressions.Expression{System.Action{`0}})"> | |
3279 <summary> | |
3280 Specifies a setup on the mocked type for a call to | |
3281 to a void method. | |
3282 </summary><remarks> | |
3283 If more than one setup is specified for the same method or property, | |
3284 the latest one wins and is the one that will be executed. | |
3285 </remarks><param name="expression">Lambda expression that specifies the expected method invocation.</param><example group="setups"> | |
3286 <code> | |
3287 var mock = new Mock<IProcessor>(); | |
3288 mock.Setup(x => x.Execute("ping")); | |
3289 </code> | |
3290 </example> | |
3291 </member> | |
3292 <member name="M:Moq.Mock`1.Setup``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"> | |
3293 <summary> | |
3294 Specifies a setup on the mocked type for a call to | |
3295 to a value returning method. | |
3296 </summary><typeparam name="TResult">Type of the return value. Typically omitted as it can be inferred from the expression.</typeparam><remarks> | |
3297 If more than one setup is specified for the same method or property, | |
3298 the latest one wins and is the one that will be executed. | |
3299 </remarks><param name="expression">Lambda expression that specifies the method invocation.</param><example group="setups"> | |
3300 <code> | |
3301 mock.Setup(x => x.HasInventory("Talisker", 50)).Returns(true); | |
3302 </code> | |
3303 </example> | |
3304 </member> | |
3305 <member name="M:Moq.Mock`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"> | |
3306 <summary> | |
3307 Specifies a setup on the mocked type for a call to | |
3308 to a property getter. | |
3309 </summary><remarks> | |
3310 If more than one setup is set for the same property getter, | |
3311 the latest one wins and is the one that will be executed. | |
3312 </remarks><typeparam name="TProperty">Type of the property. Typically omitted as it can be inferred from the expression.</typeparam><param name="expression">Lambda expression that specifies the property getter.</param><example group="setups"> | |
3313 <code> | |
3314 mock.SetupGet(x => x.Suspended) | |
3315 .Returns(true); | |
3316 </code> | |
3317 </example> | |
3318 </member> | |
3319 <member name="M:Moq.Mock`1.SetupSet``1(System.Action{`0})"> | |
3320 <summary> | |
3321 Specifies a setup on the mocked type for a call to | |
3322 to a property setter. | |
3323 </summary><remarks> | |
3324 If more than one setup is set for the same property setter, | |
3325 the latest one wins and is the one that will be executed. | |
3326 <para> | |
3327 This overloads allows the use of a callback already | |
3328 typed for the property type. | |
3329 </para> | |
3330 </remarks><typeparam name="TProperty">Type of the property. Typically omitted as it can be inferred from the expression.</typeparam><param name="setterExpression">The Lambda expression that sets a property to a value.</param><example group="setups"> | |
3331 <code> | |
3332 mock.SetupSet(x => x.Suspended = true); | |
3333 </code> | |
3334 </example> | |
3335 </member> | |
3336 <member name="M:Moq.Mock`1.SetupSet(System.Action{`0})"> | |
3337 <summary> | |
3338 Specifies a setup on the mocked type for a call to | |
3339 to a property setter. | |
3340 </summary><remarks> | |
3341 If more than one setup is set for the same property setter, | |
3342 the latest one wins and is the one that will be executed. | |
3343 </remarks><param name="setterExpression">Lambda expression that sets a property to a value.</param><example group="setups"> | |
3344 <code> | |
3345 mock.SetupSet(x => x.Suspended = true); | |
3346 </code> | |
3347 </example> | |
3348 </member> | |
3349 <member name="M:Moq.Mock`1.SetupProperty``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"> | |
3350 <summary> | |
3351 Specifies that the given property should have "property behavior", | |
3352 meaning that setting its value will cause it to be saved and | |
3353 later returned when the property is requested. (this is also | |
3354 known as "stubbing"). | |
3355 </summary><typeparam name="TProperty"> | |
3356 Type of the property, inferred from the property | |
3357 expression (does not need to be specified). | |
3358 </typeparam><param name="property">Property expression to stub.</param><example> | |
3359 If you have an interface with an int property <c>Value</c>, you might | |
3360 stub it using the following straightforward call: | |
3361 <code> | |
3362 var mock = new Mock<IHaveValue>(); | |
3363 mock.Stub(v => v.Value); | |
3364 </code> | |
3365 After the <c>Stub</c> call has been issued, setting and | |
3366 retrieving the object value will behave as expected: | |
3367 <code> | |
3368 IHaveValue v = mock.Object; | |
3369 | |
3370 v.Value = 5; | |
3371 Assert.Equal(5, v.Value); | |
3372 </code> | |
3373 </example> | |
3374 </member> | |
3375 <member name="M:Moq.Mock`1.SetupProperty``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},``0)"> | |
3376 <summary> | |
3377 Specifies that the given property should have "property behavior", | |
3378 meaning that setting its value will cause it to be saved and | |
3379 later returned when the property is requested. This overload | |
3380 allows setting the initial value for the property. (this is also | |
3381 known as "stubbing"). | |
3382 </summary><typeparam name="TProperty"> | |
3383 Type of the property, inferred from the property | |
3384 expression (does not need to be specified). | |
3385 </typeparam><param name="property">Property expression to stub.</param><param name="initialValue">Initial value for the property.</param><example> | |
3386 If you have an interface with an int property <c>Value</c>, you might | |
3387 stub it using the following straightforward call: | |
3388 <code> | |
3389 var mock = new Mock<IHaveValue>(); | |
3390 mock.SetupProperty(v => v.Value, 5); | |
3391 </code> | |
3392 After the <c>SetupProperty</c> call has been issued, setting and | |
3393 retrieving the object value will behave as expected: | |
3394 <code> | |
3395 IHaveValue v = mock.Object; | |
3396 // Initial value was stored | |
3397 Assert.Equal(5, v.Value); | |
3398 | |
3399 // New value set which changes the initial value | |
3400 v.Value = 6; | |
3401 Assert.Equal(6, v.Value); | |
3402 </code> | |
3403 </example> | |
3404 </member> | |
3405 <member name="M:Moq.Mock`1.SetupAllProperties"> | |
3406 <summary> | |
3407 Specifies that the all properties on the mock should have "property behavior", | |
3408 meaning that setting its value will cause it to be saved and | |
3409 later returned when the property is requested. (this is also | |
3410 known as "stubbing"). The default value for each property will be the | |
3411 one generated as specified by the <see cref="P:Moq.Mock.DefaultValue"/> property for the mock. | |
3412 </summary><remarks> | |
3413 If the mock <see cref="P:Moq.Mock.DefaultValue"/> is set to <see cref="F:Moq.DefaultValue.Mock"/>, | |
3414 the mocked default values will also get all properties setup recursively. | |
3415 </remarks> | |
3416 </member> | |
3417 <member name="M:Moq.Mock`1.When(System.Func{System.Boolean})"> | |
3418 <!-- No matching elements were found for the following include tag --><include file="Mock.Generic.xdoc" path="docs/doc[@for="Mock{T}.When"]/*"/> | |
3419 </member> | |
3420 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}})"> | |
3421 <summary> | |
3422 Verifies that a specific invocation matching the given expression was performed on the mock. Use | |
3423 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>. | |
3424 </summary><example group="verification"> | |
3425 This example assumes that the mock has been used, and later we want to verify that a given | |
3426 invocation with specific parameters was performed: | |
3427 <code> | |
3428 var mock = new Mock<IProcessor>(); | |
3429 // exercise mock | |
3430 //... | |
3431 // Will throw if the test code didn't call Execute with a "ping" string argument. | |
3432 mock.Verify(proc => proc.Execute("ping")); | |
3433 </code> | |
3434 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param> | |
3435 </member> | |
3436 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},Moq.Times)"> | |
3437 <summary> | |
3438 Verifies that a specific invocation matching the given expression was performed on the mock. Use | |
3439 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>. | |
3440 </summary><exception cref="T:Moq.MockException"> | |
3441 The invocation was not call the times specified by | |
3442 <paramref name="times"/>. | |
3443 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param> | |
3444 </member> | |
3445 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},System.String)"> | |
3446 <summary> | |
3447 Verifies that a specific invocation matching the given expression was performed on the mock, | |
3448 specifying a failure error message. Use in conjuntion with the default | |
3449 <see cref="F:Moq.MockBehavior.Loose"/>. | |
3450 </summary><example group="verification"> | |
3451 This example assumes that the mock has been used, and later we want to verify that a given | |
3452 invocation with specific parameters was performed: | |
3453 <code> | |
3454 var mock = new Mock<IProcessor>(); | |
3455 // exercise mock | |
3456 //... | |
3457 // Will throw if the test code didn't call Execute with a "ping" string argument. | |
3458 mock.Verify(proc => proc.Execute("ping")); | |
3459 </code> | |
3460 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param> | |
3461 </member> | |
3462 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},Moq.Times,System.String)"> | |
3463 <summary> | |
3464 Verifies that a specific invocation matching the given expression was performed on the mock, | |
3465 specifying a failure error message. Use in conjuntion with the default | |
3466 <see cref="F:Moq.MockBehavior.Loose"/>. | |
3467 </summary><exception cref="T:Moq.MockException"> | |
3468 The invocation was not call the times specified by | |
3469 <paramref name="times"/>. | |
3470 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><param name="failMessage">Message to show if verification fails.</param> | |
3471 </member> | |
3472 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"> | |
3473 <summary> | |
3474 Verifies that a specific invocation matching the given expression was performed on the mock. Use | |
3475 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>. | |
3476 </summary><example group="verification"> | |
3477 This example assumes that the mock has been used, and later we want to verify that a given | |
3478 invocation with specific parameters was performed: | |
3479 <code> | |
3480 var mock = new Mock<IWarehouse>(); | |
3481 // exercise mock | |
3482 //... | |
3483 // Will throw if the test code didn't call HasInventory. | |
3484 mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50)); | |
3485 </code> | |
3486 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><typeparam name="TResult">Type of return value from the expression.</typeparam> | |
3487 </member> | |
3488 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times)"> | |
3489 <summary> | |
3490 Verifies that a specific invocation matching the given | |
3491 expression was performed on the mock. Use in conjuntion | |
3492 with the default <see cref="F:Moq.MockBehavior.Loose"/>. | |
3493 </summary><exception cref="T:Moq.MockException"> | |
3494 The invocation was not call the times specified by | |
3495 <paramref name="times"/>. | |
3496 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><typeparam name="TResult">Type of return value from the expression.</typeparam> | |
3497 </member> | |
3498 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.String)"> | |
3499 <summary> | |
3500 Verifies that a specific invocation matching the given | |
3501 expression was performed on the mock, specifying a failure | |
3502 error message. | |
3503 </summary><example group="verification"> | |
3504 This example assumes that the mock has been used, | |
3505 and later we want to verify that a given invocation | |
3506 with specific parameters was performed: | |
3507 <code> | |
3508 var mock = new Mock<IWarehouse>(); | |
3509 // exercise mock | |
3510 //... | |
3511 // Will throw if the test code didn't call HasInventory. | |
3512 mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50), "When filling orders, inventory has to be checked"); | |
3513 </code> | |
3514 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TResult">Type of return value from the expression.</typeparam> | |
3515 </member> | |
3516 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times,System.String)"> | |
3517 <summary> | |
3518 Verifies that a specific invocation matching the given | |
3519 expression was performed on the mock, specifying a failure | |
3520 error message. | |
3521 </summary><exception cref="T:Moq.MockException"> | |
3522 The invocation was not call the times specified by | |
3523 <paramref name="times"/>. | |
3524 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TResult">Type of return value from the expression.</typeparam> | |
3525 </member> | |
3526 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"> | |
3527 <summary> | |
3528 Verifies that a property was read on the mock. | |
3529 </summary><example group="verification"> | |
3530 This example assumes that the mock has been used, | |
3531 and later we want to verify that a given property | |
3532 was retrieved from it: | |
3533 <code> | |
3534 var mock = new Mock<IWarehouse>(); | |
3535 // exercise mock | |
3536 //... | |
3537 // Will throw if the test code didn't retrieve the IsClosed property. | |
3538 mock.VerifyGet(warehouse => warehouse.IsClosed); | |
3539 </code> | |
3540 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><typeparam name="TProperty"> | |
3541 Type of the property to verify. Typically omitted as it can | |
3542 be inferred from the expression's return type. | |
3543 </typeparam> | |
3544 </member> | |
3545 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times)"> | |
3546 <summary> | |
3547 Verifies that a property was read on the mock. | |
3548 </summary><exception cref="T:Moq.MockException"> | |
3549 The invocation was not call the times specified by | |
3550 <paramref name="times"/>. | |
3551 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="expression">Expression to verify.</param><typeparam name="TProperty"> | |
3552 Type of the property to verify. Typically omitted as it can | |
3553 be inferred from the expression's return type. | |
3554 </typeparam> | |
3555 </member> | |
3556 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.String)"> | |
3557 <summary> | |
3558 Verifies that a property was read on the mock, specifying a failure | |
3559 error message. | |
3560 </summary><example group="verification"> | |
3561 This example assumes that the mock has been used, | |
3562 and later we want to verify that a given property | |
3563 was retrieved from it: | |
3564 <code> | |
3565 var mock = new Mock<IWarehouse>(); | |
3566 // exercise mock | |
3567 //... | |
3568 // Will throw if the test code didn't retrieve the IsClosed property. | |
3569 mock.VerifyGet(warehouse => warehouse.IsClosed); | |
3570 </code> | |
3571 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TProperty"> | |
3572 Type of the property to verify. Typically omitted as it can | |
3573 be inferred from the expression's return type. | |
3574 </typeparam> | |
3575 </member> | |
3576 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times,System.String)"> | |
3577 <summary> | |
3578 Verifies that a property was read on the mock, specifying a failure | |
3579 error message. | |
3580 </summary><exception cref="T:Moq.MockException"> | |
3581 The invocation was not call the times specified by | |
3582 <paramref name="times"/>. | |
3583 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TProperty"> | |
3584 Type of the property to verify. Typically omitted as it can | |
3585 be inferred from the expression's return type. | |
3586 </typeparam> | |
3587 </member> | |
3588 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0})"> | |
3589 <summary> | |
3590 Verifies that a property was set on the mock. | |
3591 </summary><example group="verification"> | |
3592 This example assumes that the mock has been used, | |
3593 and later we want to verify that a given property | |
3594 was set on it: | |
3595 <code> | |
3596 var mock = new Mock<IWarehouse>(); | |
3597 // exercise mock | |
3598 //... | |
3599 // Will throw if the test code didn't set the IsClosed property. | |
3600 mock.VerifySet(warehouse => warehouse.IsClosed = true); | |
3601 </code> | |
3602 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="setterExpression">Expression to verify.</param> | |
3603 </member> | |
3604 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},Moq.Times)"> | |
3605 <summary> | |
3606 Verifies that a property was set on the mock. | |
3607 </summary><exception cref="T:Moq.MockException"> | |
3608 The invocation was not call the times specified by | |
3609 <paramref name="times"/>. | |
3610 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="setterExpression">Expression to verify.</param> | |
3611 </member> | |
3612 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},System.String)"> | |
3613 <summary> | |
3614 Verifies that a property was set on the mock, specifying | |
3615 a failure message. | |
3616 </summary><example group="verification"> | |
3617 This example assumes that the mock has been used, | |
3618 and later we want to verify that a given property | |
3619 was set on it: | |
3620 <code> | |
3621 var mock = new Mock<IWarehouse>(); | |
3622 // exercise mock | |
3623 //... | |
3624 // Will throw if the test code didn't set the IsClosed property. | |
3625 mock.VerifySet(warehouse => warehouse.IsClosed = true, "Warehouse should always be closed after the action"); | |
3626 </code> | |
3627 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="setterExpression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param> | |
3628 </member> | |
3629 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},Moq.Times,System.String)"> | |
3630 <summary> | |
3631 Verifies that a property was set on the mock, specifying | |
3632 a failure message. | |
3633 </summary><exception cref="T:Moq.MockException"> | |
3634 The invocation was not call the times specified by | |
3635 <paramref name="times"/>. | |
3636 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="setterExpression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param> | |
3637 </member> | |
3638 <member name="M:Moq.Mock`1.Raise(System.Action{`0},System.EventArgs)"> | |
3639 <summary> | |
3640 Raises the event referenced in <paramref name="eventExpression"/> using | |
3641 the given <paramref name="args"/> argument. | |
3642 </summary><exception cref="T:System.ArgumentException"> | |
3643 The <paramref name="args"/> argument is | |
3644 invalid for the target event invocation, or the <paramref name="eventExpression"/> is | |
3645 not an event attach or detach expression. | |
3646 </exception><example> | |
3647 The following example shows how to raise a <see cref="E:System.ComponentModel.INotifyPropertyChanged.PropertyChanged"/> event: | |
3648 <code> | |
3649 var mock = new Mock<IViewModel>(); | |
3650 | |
3651 mock.Raise(x => x.PropertyChanged -= null, new PropertyChangedEventArgs("Name")); | |
3652 </code> | |
3653 </example><example> | |
3654 This example shows how to invoke an event with a custom event arguments | |
3655 class in a view that will cause its corresponding presenter to | |
3656 react by changing its state: | |
3657 <code> | |
3658 var mockView = new Mock<IOrdersView>(); | |
3659 var presenter = new OrdersPresenter(mockView.Object); | |
3660 | |
3661 // Check that the presenter has no selection by default | |
3662 Assert.Null(presenter.SelectedOrder); | |
3663 | |
3664 // Raise the event with a specific arguments data | |
3665 mockView.Raise(v => v.SelectionChanged += null, new OrderEventArgs { Order = new Order("moq", 500) }); | |
3666 | |
3667 // Now the presenter reacted to the event, and we have a selected order | |
3668 Assert.NotNull(presenter.SelectedOrder); | |
3669 Assert.Equal("moq", presenter.SelectedOrder.ProductName); | |
3670 </code> | |
3671 </example> | |
3672 </member> | |
3673 <member name="M:Moq.Mock`1.Raise(System.Action{`0},System.Object[])"> | |
3674 <summary> | |
3675 Raises the event referenced in <paramref name="eventExpression"/> using | |
3676 the given <paramref name="args"/> argument for a non-EventHandler typed event. | |
3677 </summary><exception cref="T:System.ArgumentException"> | |
3678 The <paramref name="args"/> arguments are | |
3679 invalid for the target event invocation, or the <paramref name="eventExpression"/> is | |
3680 not an event attach or detach expression. | |
3681 </exception><example> | |
3682 The following example shows how to raise a custom event that does not adhere to | |
3683 the standard <c>EventHandler</c>: | |
3684 <code> | |
3685 var mock = new Mock<IViewModel>(); | |
3686 | |
3687 mock.Raise(x => x.MyEvent -= null, "Name", bool, 25); | |
3688 </code> | |
3689 </example> | |
3690 </member> | |
3691 <member name="P:Moq.Mock`1.Object"> | |
3692 <summary> | |
3693 Exposes the mocked object instance. | |
3694 </summary> | |
3695 </member> | |
3696 <member name="T:Moq.MockLegacyExtensions"> | |
3697 <summary> | |
3698 Provides legacy API members as extensions so that | |
3699 existing code continues to compile, but new code | |
3700 doesn't see then. | |
3701 </summary> | |
3702 </member> | |
3703 <member name="M:Moq.MockLegacyExtensions.SetupSet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1)"> | |
3704 <summary> | |
3705 Obsolete. | |
3706 </summary> | |
3707 </member> | |
3708 <member name="M:Moq.MockLegacyExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1)"> | |
3709 <summary> | |
3710 Obsolete. | |
3711 </summary> | |
3712 </member> | |
3713 <member name="M:Moq.MockLegacyExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1,System.String)"> | |
3714 <summary> | |
3715 Obsolete. | |
3716 </summary> | |
3717 </member> | |
3718 <member name="T:Moq.MockExtensions"> | |
3719 <summary> | |
3720 Provides additional methods on mocks. | |
3721 </summary> | |
3722 <devdoc> | |
3723 Provided as extension methods as they confuse the compiler | |
3724 with the overloads taking Action. | |
3725 </devdoc> | |
3726 </member> | |
3727 <member name="M:Moq.MockExtensions.SetupSet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})"> | |
3728 <summary> | |
3729 Specifies a setup on the mocked type for a call to | |
3730 to a property setter, regardless of its value. | |
3731 </summary> | |
3732 <remarks> | |
3733 If more than one setup is set for the same property setter, | |
3734 the latest one wins and is the one that will be executed. | |
3735 </remarks> | |
3736 <typeparam name="TProperty">Type of the property. Typically omitted as it can be inferred from the expression.</typeparam> | |
3737 <typeparam name="T">Type of the mock.</typeparam> | |
3738 <param name="mock">The target mock for the setup.</param> | |
3739 <param name="expression">Lambda expression that specifies the property setter.</param> | |
3740 <example group="setups"> | |
3741 <code> | |
3742 mock.SetupSet(x => x.Suspended); | |
3743 </code> | |
3744 </example> | |
3745 <devdoc> | |
3746 This method is not legacy, but must be on an extension method to avoid | |
3747 confusing the compiler with the new Action syntax. | |
3748 </devdoc> | |
3749 </member> | |
3750 <member name="M:Moq.MockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})"> | |
3751 <summary> | |
3752 Verifies that a property has been set on the mock, regarless of its value. | |
3753 </summary> | |
3754 <example group="verification"> | |
3755 This example assumes that the mock has been used, | |
3756 and later we want to verify that a given invocation | |
3757 with specific parameters was performed: | |
3758 <code> | |
3759 var mock = new Mock<IWarehouse>(); | |
3760 // exercise mock | |
3761 //... | |
3762 // Will throw if the test code didn't set the IsClosed property. | |
3763 mock.VerifySet(warehouse => warehouse.IsClosed); | |
3764 </code> | |
3765 </example> | |
3766 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception> | |
3767 <param name="expression">Expression to verify.</param> | |
3768 <param name="mock">The mock instance.</param> | |
3769 <typeparam name="T">Mocked type.</typeparam> | |
3770 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can | |
3771 be inferred from the expression's return type.</typeparam> | |
3772 </member> | |
3773 <member name="M:Moq.MockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.String)"> | |
3774 <summary> | |
3775 Verifies that a property has been set on the mock, specifying a failure | |
3776 error message. | |
3777 </summary> | |
3778 <example group="verification"> | |
3779 This example assumes that the mock has been used, | |
3780 and later we want to verify that a given invocation | |
3781 with specific parameters was performed: | |
3782 <code> | |
3783 var mock = new Mock<IWarehouse>(); | |
3784 // exercise mock | |
3785 //... | |
3786 // Will throw if the test code didn't set the IsClosed property. | |
3787 mock.VerifySet(warehouse => warehouse.IsClosed); | |
3788 </code> | |
3789 </example> | |
3790 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception> | |
3791 <param name="expression">Expression to verify.</param> | |
3792 <param name="failMessage">Message to show if verification fails.</param> | |
3793 <param name="mock">The mock instance.</param> | |
3794 <typeparam name="T">Mocked type.</typeparam> | |
3795 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can | |
3796 be inferred from the expression's return type.</typeparam> | |
3797 </member> | |
3798 <member name="M:Moq.MockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},Moq.Times)"> | |
3799 <summary> | |
3800 Verifies that a property has been set on the mock, regardless | |
3801 of the value but only the specified number of times. | |
3802 </summary> | |
3803 <example group="verification"> | |
3804 This example assumes that the mock has been used, | |
3805 and later we want to verify that a given invocation | |
3806 with specific parameters was performed: | |
3807 <code> | |
3808 var mock = new Mock<IWarehouse>(); | |
3809 // exercise mock | |
3810 //... | |
3811 // Will throw if the test code didn't set the IsClosed property. | |
3812 mock.VerifySet(warehouse => warehouse.IsClosed); | |
3813 </code> | |
3814 </example> | |
3815 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception> | |
3816 <exception cref="T:Moq.MockException">The invocation was not call the times specified by | |
3817 <paramref name="times"/>.</exception> | |
3818 <param name="mock">The mock instance.</param> | |
3819 <typeparam name="T">Mocked type.</typeparam> | |
3820 <param name="times">The number of times a method is allowed to be called.</param> | |
3821 <param name="expression">Expression to verify.</param> | |
3822 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can | |
3823 be inferred from the expression's return type.</typeparam> | |
3824 </member> | |
3825 <member name="M:Moq.MockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},Moq.Times,System.String)"> | |
3826 <summary> | |
3827 Verifies that a property has been set on the mock, regardless | |
3828 of the value but only the specified number of times, and specifying a failure | |
3829 error message. | |
3830 </summary> | |
3831 <example group="verification"> | |
3832 This example assumes that the mock has been used, | |
3833 and later we want to verify that a given invocation | |
3834 with specific parameters was performed: | |
3835 <code> | |
3836 var mock = new Mock<IWarehouse>(); | |
3837 // exercise mock | |
3838 //... | |
3839 // Will throw if the test code didn't set the IsClosed property. | |
3840 mock.VerifySet(warehouse => warehouse.IsClosed); | |
3841 </code> | |
3842 </example> | |
3843 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception> | |
3844 <exception cref="T:Moq.MockException">The invocation was not call the times specified by | |
3845 <paramref name="times"/>.</exception> | |
3846 <param name="mock">The mock instance.</param> | |
3847 <typeparam name="T">Mocked type.</typeparam> | |
3848 <param name="times">The number of times a method is allowed to be called.</param> | |
3849 <param name="failMessage">Message to show if verification fails.</param> | |
3850 <param name="expression">Expression to verify.</param> | |
3851 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can | |
3852 be inferred from the expression's return type.</typeparam> | |
3853 </member> | |
3854 <member name="T:Moq.SequenceExtensions"> | |
3855 <summary> | |
3856 Helper for sequencing return values in the same method. | |
3857 </summary> | |
3858 </member> | |
3859 <member name="M:Moq.SequenceExtensions.SetupSequence``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})"> | |
3860 <summary> | |
3861 Return a sequence of values, once per call. | |
3862 </summary> | |
3863 </member> | |
3864 <member name="M:Moq.ExpressionExtensions.ToLambda(System.Linq.Expressions.Expression)"> | |
3865 <summary> | |
3866 Casts the expression to a lambda expression, removing | |
3867 a cast if there's any. | |
3868 </summary> | |
3869 </member> | |
3870 <member name="M:Moq.ExpressionExtensions.ToMethodCall(System.Linq.Expressions.LambdaExpression)"> | |
3871 <summary> | |
3872 Casts the body of the lambda expression to a <see cref="T:System.Linq.Expressions.MethodCallExpression"/>. | |
3873 </summary> | |
3874 <exception cref="T:System.ArgumentException">If the body is not a method call.</exception> | |
3875 </member> | |
3876 <member name="M:Moq.ExpressionExtensions.ToPropertyInfo(System.Linq.Expressions.LambdaExpression)"> | |
3877 <summary> | |
3878 Converts the body of the lambda expression into the <see cref="T:System.Reflection.PropertyInfo"/> referenced by it. | |
3879 </summary> | |
3880 </member> | |
3881 <member name="M:Moq.ExpressionExtensions.IsProperty(System.Linq.Expressions.LambdaExpression)"> | |
3882 <summary> | |
3883 Checks whether the body of the lambda expression is a property access. | |
3884 </summary> | |
3885 </member> | |
3886 <member name="M:Moq.ExpressionExtensions.IsProperty(System.Linq.Expressions.Expression)"> | |
3887 <summary> | |
3888 Checks whether the expression is a property access. | |
3889 </summary> | |
3890 </member> | |
3891 <member name="M:Moq.ExpressionExtensions.IsPropertyIndexer(System.Linq.Expressions.LambdaExpression)"> | |
3892 <summary> | |
3893 Checks whether the body of the lambda expression is a property indexer, which is true | |
3894 when the expression is an <see cref="T:System.Linq.Expressions.MethodCallExpression"/> whose | |
3895 <see cref="P:System.Linq.Expressions.MethodCallExpression.Method"/> has <see cref="P:System.Reflection.MethodBase.IsSpecialName"/> | |
3896 equal to <see langword="true"/>. | |
3897 </summary> | |
3898 </member> | |
3899 <member name="M:Moq.ExpressionExtensions.IsPropertyIndexer(System.Linq.Expressions.Expression)"> | |
3900 <summary> | |
3901 Checks whether the expression is a property indexer, which is true | |
3902 when the expression is an <see cref="T:System.Linq.Expressions.MethodCallExpression"/> whose | |
3903 <see cref="P:System.Linq.Expressions.MethodCallExpression.Method"/> has <see cref="P:System.Reflection.MethodBase.IsSpecialName"/> | |
3904 equal to <see langword="true"/>. | |
3905 </summary> | |
3906 </member> | |
3907 <member name="M:Moq.ExpressionExtensions.CastTo``1(System.Linq.Expressions.Expression)"> | |
3908 <summary> | |
3909 Creates an expression that casts the given expression to the <typeparamref name="T"/> | |
3910 type. | |
3911 </summary> | |
3912 </member> | |
3913 <member name="M:Moq.ExpressionExtensions.ToStringFixed(System.Linq.Expressions.Expression)"> | |
3914 <devdoc> | |
3915 TODO: remove this code when https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=331583 | |
3916 is fixed. | |
3917 </devdoc> | |
3918 </member> | |
3919 <member name="T:Moq.Evaluator"> | |
3920 <summary> | |
3921 Provides partial evaluation of subtrees, whenever they can be evaluated locally. | |
3922 </summary> | |
3923 <author>Matt Warren: http://blogs.msdn.com/mattwar</author> | |
3924 <contributor>Documented by InSTEDD: http://www.instedd.org</contributor> | |
3925 </member> | |
3926 <member name="M:Moq.Evaluator.PartialEval(System.Linq.Expressions.Expression,System.Func{System.Linq.Expressions.Expression,System.Boolean})"> | |
3927 <summary> | |
3928 Performs evaluation and replacement of independent sub-trees | |
3929 </summary> | |
3930 <param name="expression">The root of the expression tree.</param> | |
3931 <param name="fnCanBeEvaluated">A function that decides whether a given expression | |
3932 node can be part of the local function.</param> | |
3933 <returns>A new tree with sub-trees evaluated and replaced.</returns> | |
3934 </member> | |
3935 <member name="M:Moq.Evaluator.PartialEval(System.Linq.Expressions.Expression)"> | |
3936 <summary> | |
3937 Performs evaluation and replacement of independent sub-trees | |
3938 </summary> | |
3939 <param name="expression">The root of the expression tree.</param> | |
3940 <returns>A new tree with sub-trees evaluated and replaced.</returns> | |
3941 </member> | |
3942 <member name="T:Moq.Evaluator.SubtreeEvaluator"> | |
3943 <summary> | |
3944 Evaluates and replaces sub-trees when first candidate is reached (top-down) | |
3945 </summary> | |
3946 </member> | |
3947 <member name="T:Moq.Evaluator.Nominator"> | |
3948 <summary> | |
3949 Performs bottom-up analysis to determine which nodes can possibly | |
3950 be part of an evaluated sub-tree. | |
3951 </summary> | |
3952 </member> | |
3953 <member name="M:Moq.Guard.NotNull``1(System.Linq.Expressions.Expression{System.Func{``0}},``0)"> | |
3954 <summary> | |
3955 Ensures the given <paramref name="value"/> is not null. | |
3956 Throws <see cref="T:System.ArgumentNullException"/> otherwise. | |
3957 </summary> | |
3958 </member> | |
3959 <member name="M:Moq.Guard.NotNullOrEmpty(System.Linq.Expressions.Expression{System.Func{System.String}},System.String)"> | |
3960 <summary> | |
3961 Ensures the given string <paramref name="value"/> is not null or empty. | |
3962 Throws <see cref="T:System.ArgumentNullException"/> in the first case, or | |
3963 <see cref="T:System.ArgumentException"/> in the latter. | |
3964 </summary> | |
3965 </member> | |
3966 <member name="M:Moq.Guard.NotOutOfRangeInclusive``1(System.Linq.Expressions.Expression{System.Func{``0}},``0,``0,``0)"> | |
3967 <summary> | |
3968 Checks an argument to ensure it is in the specified range including the edges. | |
3969 </summary> | |
3970 <typeparam name="T">Type of the argument to check, it must be an <see cref="T:System.IComparable"/> type. | |
3971 </typeparam> | |
3972 <param name="reference">The expression containing the name of the argument.</param> | |
3973 <param name="value">The argument value to check.</param> | |
3974 <param name="from">The minimun allowed value for the argument.</param> | |
3975 <param name="to">The maximun allowed value for the argument.</param> | |
3976 </member> | |
3977 <member name="M:Moq.Guard.NotOutOfRangeExclusive``1(System.Linq.Expressions.Expression{System.Func{``0}},``0,``0,``0)"> | |
3978 <summary> | |
3979 Checks an argument to ensure it is in the specified range excluding the edges. | |
3980 </summary> | |
3981 <typeparam name="T">Type of the argument to check, it must be an <see cref="T:System.IComparable"/> type. | |
3982 </typeparam> | |
3983 <param name="reference">The expression containing the name of the argument.</param> | |
3984 <param name="value">The argument value to check.</param> | |
3985 <param name="from">The minimun allowed value for the argument.</param> | |
3986 <param name="to">The maximun allowed value for the argument.</param> | |
3987 </member> | |
3988 <member name="T:Moq.IMocked`1"> | |
3989 <summary> | |
3990 Implemented by all generated mock object instances. | |
3991 </summary> | |
3992 </member> | |
3993 <member name="T:Moq.IMocked"> | |
3994 <summary> | |
3995 Implemented by all generated mock object instances. | |
3996 </summary> | |
3997 </member> | |
3998 <member name="P:Moq.IMocked.Mock"> | |
3999 <summary> | |
4000 Reference the Mock that contains this as the <c>mock.Object</c> value. | |
4001 </summary> | |
4002 </member> | |
4003 <member name="P:Moq.IMocked`1.Mock"> | |
4004 <summary> | |
4005 Reference the Mock that contains this as the <c>mock.Object</c> value. | |
4006 </summary> | |
4007 </member> | |
4008 <member name="T:Moq.Interceptor"> | |
4009 <summary> | |
4010 Implements the actual interception and method invocation for | |
4011 all mocks. | |
4012 </summary> | |
4013 </member> | |
4014 <member name="M:Moq.Interceptor.GetEventFromName(System.String)"> | |
4015 <summary> | |
4016 Get an eventInfo for a given event name. Search type ancestors depth first if necessary. | |
4017 </summary> | |
4018 <param name="eventName">Name of the event, with the set_ or get_ prefix already removed</param> | |
4019 </member> | |
4020 <member name="M:Moq.Interceptor.GetAncestorTypes(System.Type)"> | |
4021 <summary> | |
4022 Given a type return all of its ancestors, both types and interfaces. | |
4023 </summary> | |
4024 <param name="initialType">The type to find immediate ancestors of</param> | |
4025 </member> | |
4026 <member name="T:Moq.Language.Flow.ISetupSetter`2"> | |
4027 <summary> | |
4028 Implements the fluent API. | |
4029 </summary> | |
4030 </member> | |
4031 <member name="T:Moq.Language.ICallbackSetter`1"> | |
4032 <summary> | |
4033 Defines the <c>Callback</c> verb for property setter setups. | |
4034 </summary> | |
4035 <typeparam name="TProperty">Type of the property.</typeparam> | |
4036 </member> | |
4037 <member name="M:Moq.Language.ICallbackSetter`1.Callback(System.Action{`0})"> | |
4038 <summary> | |
4039 Specifies a callback to invoke when the property is set that receives the | |
4040 property value being set. | |
4041 </summary> | |
4042 <param name="action">Callback method to invoke.</param> | |
4043 <example> | |
4044 Invokes the given callback with the property value being set. | |
4045 <code> | |
4046 mock.SetupSet(x => x.Suspended) | |
4047 .Callback((bool state) => Console.WriteLine(state)); | |
4048 </code> | |
4049 </example> | |
4050 </member> | |
4051 <member name="T:Moq.It"> | |
4052 <summary> | |
4053 Allows the specification of a matching condition for an | |
4054 argument in a method invocation, rather than a specific | |
4055 argument value. "It" refers to the argument being matched. | |
4056 </summary><remarks> | |
4057 This class allows the setup to match a method invocation | |
4058 with an arbitrary value, with a value in a specified range, or | |
4059 even one that matches a given predicate. | |
4060 </remarks> | |
4061 </member> | |
4062 <member name="M:Moq.It.IsAny``1"> | |
4063 <summary> | |
4064 Matches any value of the given <typeparamref name="TValue"/> type. | |
4065 </summary><remarks> | |
4066 Typically used when the actual argument value for a method | |
4067 call is not relevant. | |
4068 </remarks><example> | |
4069 <code> | |
4070 // Throws an exception for a call to Remove with any string value. | |
4071 mock.Setup(x => x.Remove(It.IsAny<string>())).Throws(new InvalidOperationException()); | |
4072 </code> | |
4073 </example><typeparam name="TValue">Type of the value.</typeparam> | |
4074 </member> | |
4075 <member name="M:Moq.It.Is``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})"> | |
4076 <summary> | |
4077 Matches any value that satisfies the given predicate. | |
4078 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="match">The predicate used to match the method argument.</param><remarks> | |
4079 Allows the specification of a predicate to perform matching | |
4080 of method call arguments. | |
4081 </remarks><example> | |
4082 This example shows how to return the value <c>1</c> whenever the argument to the | |
4083 <c>Do</c> method is an even number. | |
4084 <code> | |
4085 mock.Setup(x => x.Do(It.Is<int>(i => i % 2 == 0))) | |
4086 .Returns(1); | |
4087 </code> | |
4088 This example shows how to throw an exception if the argument to the | |
4089 method is a negative number: | |
4090 <code> | |
4091 mock.Setup(x => x.GetUser(It.Is<int>(i => i < 0))) | |
4092 .Throws(new ArgumentException()); | |
4093 </code> | |
4094 </example> | |
4095 </member> | |
4096 <member name="M:Moq.It.IsInRange``1(``0,``0,Moq.Range)"> | |
4097 <summary> | |
4098 Matches any value that is in the range specified. | |
4099 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="from">The lower bound of the range.</param><param name="to">The upper bound of the range.</param><param name="rangeKind"> | |
4100 The kind of range. See <see cref="T:Moq.Range"/>. | |
4101 </param><example> | |
4102 The following example shows how to expect a method call | |
4103 with an integer argument within the 0..100 range. | |
4104 <code> | |
4105 mock.Setup(x => x.HasInventory( | |
4106 It.IsAny<string>(), | |
4107 It.IsInRange(0, 100, Range.Inclusive))) | |
4108 .Returns(false); | |
4109 </code> | |
4110 </example> | |
4111 </member> | |
4112 <member name="M:Moq.It.IsRegex(System.String)"> | |
4113 <summary> | |
4114 Matches a string argument if it matches the given regular expression pattern. | |
4115 </summary><param name="regex">The pattern to use to match the string argument value.</param><example> | |
4116 The following example shows how to expect a call to a method where the | |
4117 string argument matches the given regular expression: | |
4118 <code> | |
4119 mock.Setup(x => x.Check(It.IsRegex("[a-z]+"))).Returns(1); | |
4120 </code> | |
4121 </example> | |
4122 </member> | |
4123 <member name="M:Moq.It.IsRegex(System.String,System.Text.RegularExpressions.RegexOptions)"> | |
4124 <summary> | |
4125 Matches a string argument if it matches the given regular expression pattern. | |
4126 </summary><param name="regex">The pattern to use to match the string argument value.</param><param name="options">The options used to interpret the pattern.</param><example> | |
4127 The following example shows how to expect a call to a method where the | |
4128 string argument matches the given regular expression, in a case insensitive way: | |
4129 <code> | |
4130 mock.Setup(x => x.Check(It.IsRegex("[a-z]+", RegexOptions.IgnoreCase))).Returns(1); | |
4131 </code> | |
4132 </example> | |
4133 </member> | |
4134 <member name="T:Moq.Matchers.MatcherAttributeMatcher"> | |
4135 <summary> | |
4136 Matcher to treat static functions as matchers. | |
4137 | |
4138 mock.Setup(x => x.StringMethod(A.MagicString())); | |
4139 | |
4140 public static class A | |
4141 { | |
4142 [Matcher] | |
4143 public static string MagicString() { return null; } | |
4144 public static bool MagicString(string arg) | |
4145 { | |
4146 return arg == "magic"; | |
4147 } | |
4148 } | |
4149 | |
4150 Will succeed if: mock.Object.StringMethod("magic"); | |
4151 and fail with any other call. | |
4152 </summary> | |
4153 </member> | |
4154 <member name="T:Moq.MockBehavior"> | |
4155 <summary> | |
4156 Options to customize the behavior of the mock. | |
4157 </summary> | |
4158 </member> | |
4159 <member name="F:Moq.MockBehavior.Strict"> | |
4160 <summary> | |
4161 Causes the mock to always throw | |
4162 an exception for invocations that don't have a | |
4163 corresponding setup. | |
4164 </summary> | |
4165 </member> | |
4166 <member name="F:Moq.MockBehavior.Loose"> | |
4167 <summary> | |
4168 Will never throw exceptions, returning default | |
4169 values when necessary (null for reference types, | |
4170 zero for value types or empty enumerables and arrays). | |
4171 </summary> | |
4172 </member> | |
4173 <member name="F:Moq.MockBehavior.Default"> | |
4174 <summary> | |
4175 Default mock behavior, which equals <see cref="F:Moq.MockBehavior.Loose"/>. | |
4176 </summary> | |
4177 </member> | |
4178 <member name="T:Moq.MockException"> | |
4179 <summary> | |
4180 Exception thrown by mocks when setups are not matched, | |
4181 the mock is not properly setup, etc. | |
4182 </summary> | |
4183 <remarks> | |
4184 A distinct exception type is provided so that exceptions | |
4185 thrown by the mock can be differentiated in tests that | |
4186 expect other exceptions to be thrown (i.e. ArgumentException). | |
4187 <para> | |
4188 Richer exception hierarchy/types are not provided as | |
4189 tests typically should <b>not</b> catch or expect exceptions | |
4190 from the mocks. These are typically the result of changes | |
4191 in the tested class or its collaborators implementation, and | |
4192 result in fixes in the mock setup so that they dissapear and | |
4193 allow the test to pass. | |
4194 </para> | |
4195 </remarks> | |
4196 </member> | |
4197 <member name="M:Moq.MockException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)"> | |
4198 <summary> | |
4199 Supports the serialization infrastructure. | |
4200 </summary> | |
4201 <param name="info">Serialization information.</param> | |
4202 <param name="context">Streaming context.</param> | |
4203 </member> | |
4204 <member name="M:Moq.MockException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)"> | |
4205 <summary> | |
4206 Supports the serialization infrastructure. | |
4207 </summary> | |
4208 <param name="info">Serialization information.</param> | |
4209 <param name="context">Streaming context.</param> | |
4210 </member> | |
4211 <member name="T:Moq.MockException.ExceptionReason"> | |
4212 <summary> | |
4213 Made internal as it's of no use for | |
4214 consumers, but it's important for | |
4215 our own tests. | |
4216 </summary> | |
4217 </member> | |
4218 <member name="T:Moq.MockVerificationException"> | |
4219 <devdoc> | |
4220 Used by the mock factory to accumulate verification | |
4221 failures. | |
4222 </devdoc> | |
4223 </member> | |
4224 <member name="M:Moq.MockVerificationException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)"> | |
4225 <summary> | |
4226 Supports the serialization infrastructure. | |
4227 </summary> | |
4228 </member> | |
4229 <member name="T:Moq.Properties.Resources"> | |
4230 <summary> | |
4231 A strongly-typed resource class, for looking up localized strings, etc. | |
4232 </summary> | |
4233 </member> | |
4234 <member name="P:Moq.Properties.Resources.ResourceManager"> | |
4235 <summary> | |
4236 Returns the cached ResourceManager instance used by this class. | |
4237 </summary> | |
4238 </member> | |
4239 <member name="P:Moq.Properties.Resources.Culture"> | |
4240 <summary> | |
4241 Overrides the current thread's CurrentUICulture property for all | |
4242 resource lookups using this strongly typed resource class. | |
4243 </summary> | |
4244 </member> | |
4245 <member name="P:Moq.Properties.Resources.AlreadyInitialized"> | |
4246 <summary> | |
4247 Looks up a localized string similar to Mock type has already been initialized by accessing its Object property. Adding interfaces must be done before that.. | |
4248 </summary> | |
4249 </member> | |
4250 <member name="P:Moq.Properties.Resources.ArgumentCannotBeEmpty"> | |
4251 <summary> | |
4252 Looks up a localized string similar to Value cannot be an empty string.. | |
4253 </summary> | |
4254 </member> | |
4255 <member name="P:Moq.Properties.Resources.AsMustBeInterface"> | |
4256 <summary> | |
4257 Looks up a localized string similar to Can only add interfaces to the mock.. | |
4258 </summary> | |
4259 </member> | |
4260 <member name="P:Moq.Properties.Resources.CantSetReturnValueForVoid"> | |
4261 <summary> | |
4262 Looks up a localized string similar to Can't set return value for void method {0}.. | |
4263 </summary> | |
4264 </member> | |
4265 <member name="P:Moq.Properties.Resources.ConstructorArgsForInterface"> | |
4266 <summary> | |
4267 Looks up a localized string similar to Constructor arguments cannot be passed for interface mocks.. | |
4268 </summary> | |
4269 </member> | |
4270 <member name="P:Moq.Properties.Resources.ConstructorNotFound"> | |
4271 <summary> | |
4272 Looks up a localized string similar to A matching constructor for the given arguments was not found on the mocked type.. | |
4273 </summary> | |
4274 </member> | |
4275 <member name="P:Moq.Properties.Resources.EventNofFound"> | |
4276 <summary> | |
4277 Looks up a localized string similar to Could not locate event for attach or detach method {0}.. | |
4278 </summary> | |
4279 </member> | |
4280 <member name="P:Moq.Properties.Resources.FieldsNotSupported"> | |
4281 <summary> | |
4282 Looks up a localized string similar to Expression {0} involves a field access, which is not supported. Use properties instead.. | |
4283 </summary> | |
4284 </member> | |
4285 <member name="P:Moq.Properties.Resources.InvalidMockClass"> | |
4286 <summary> | |
4287 Looks up a localized string similar to Type to mock must be an interface or an abstract or non-sealed class. . | |
4288 </summary> | |
4289 </member> | |
4290 <member name="P:Moq.Properties.Resources.InvalidMockGetType"> | |
4291 <summary> | |
4292 Looks up a localized string similar to Cannot retrieve a mock with the given object type {0} as it's not the main type of the mock or any of its additional interfaces. | |
4293 Please cast the argument to one of the supported types: {1}. | |
4294 Remember that there's no generics covariance in the CLR, so your object must be one of these types in order for the call to succeed.. | |
4295 </summary> | |
4296 </member> | |
4297 <member name="P:Moq.Properties.Resources.LinqBinaryOperatorNotSupported"> | |
4298 <summary> | |
4299 Looks up a localized string similar to The equals ("==" or "=" in VB) and the conditional 'and' ("&&" or "AndAlso" in VB) operators are the only ones supported in the query specification expression. Unsupported expression: {0}. | |
4300 </summary> | |
4301 </member> | |
4302 <member name="P:Moq.Properties.Resources.LinqMethodNotSupported"> | |
4303 <summary> | |
4304 Looks up a localized string similar to LINQ method '{0}' not supported.. | |
4305 </summary> | |
4306 </member> | |
4307 <member name="P:Moq.Properties.Resources.LinqMethodNotVirtual"> | |
4308 <summary> | |
4309 Looks up a localized string similar to Expression contains a call to a method which is not virtual (overridable in VB) or abstract. Unsupported expression: {0}. | |
4310 </summary> | |
4311 </member> | |
4312 <member name="P:Moq.Properties.Resources.MemberMissing"> | |
4313 <summary> | |
4314 Looks up a localized string similar to Member {0}.{1} does not exist.. | |
4315 </summary> | |
4316 </member> | |
4317 <member name="P:Moq.Properties.Resources.MethodIsPublic"> | |
4318 <summary> | |
4319 Looks up a localized string similar to Method {0}.{1} is public. Use strong-typed Expect overload instead: | |
4320 mock.Setup(x => x.{1}()); | |
4321 . | |
4322 </summary> | |
4323 </member> | |
4324 <member name="P:Moq.Properties.Resources.MockExceptionMessage"> | |
4325 <summary> | |
4326 Looks up a localized string similar to {0} invocation failed with mock behavior {1}. | |
4327 {2}. | |
4328 </summary> | |
4329 </member> | |
4330 <member name="P:Moq.Properties.Resources.MoreThanNCalls"> | |
4331 <summary> | |
4332 Looks up a localized string similar to Expected only {0} calls to {1}.. | |
4333 </summary> | |
4334 </member> | |
4335 <member name="P:Moq.Properties.Resources.MoreThanOneCall"> | |
4336 <summary> | |
4337 Looks up a localized string similar to Expected only one call to {0}.. | |
4338 </summary> | |
4339 </member> | |
4340 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtLeast"> | |
4341 <summary> | |
4342 Looks up a localized string similar to {0} | |
4343 Expected invocation on the mock at least {2} times, but was {4} times: {1}. | |
4344 </summary> | |
4345 </member> | |
4346 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtLeastOnce"> | |
4347 <summary> | |
4348 Looks up a localized string similar to {0} | |
4349 Expected invocation on the mock at least once, but was never performed: {1}. | |
4350 </summary> | |
4351 </member> | |
4352 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtMost"> | |
4353 <summary> | |
4354 Looks up a localized string similar to {0} | |
4355 Expected invocation on the mock at most {3} times, but was {4} times: {1}. | |
4356 </summary> | |
4357 </member> | |
4358 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtMostOnce"> | |
4359 <summary> | |
4360 Looks up a localized string similar to {0} | |
4361 Expected invocation on the mock at most once, but was {4} times: {1}. | |
4362 </summary> | |
4363 </member> | |
4364 <member name="P:Moq.Properties.Resources.NoMatchingCallsBetweenExclusive"> | |
4365 <summary> | |
4366 Looks up a localized string similar to {0} | |
4367 Expected invocation on the mock between {2} and {3} times (Exclusive), but was {4} times: {1}. | |
4368 </summary> | |
4369 </member> | |
4370 <member name="P:Moq.Properties.Resources.NoMatchingCallsBetweenInclusive"> | |
4371 <summary> | |
4372 Looks up a localized string similar to {0} | |
4373 Expected invocation on the mock between {2} and {3} times (Inclusive), but was {4} times: {1}. | |
4374 </summary> | |
4375 </member> | |
4376 <member name="P:Moq.Properties.Resources.NoMatchingCallsExactly"> | |
4377 <summary> | |
4378 Looks up a localized string similar to {0} | |
4379 Expected invocation on the mock exactly {2} times, but was {4} times: {1}. | |
4380 </summary> | |
4381 </member> | |
4382 <member name="P:Moq.Properties.Resources.NoMatchingCallsNever"> | |
4383 <summary> | |
4384 Looks up a localized string similar to {0} | |
4385 Expected invocation on the mock should never have been performed, but was {4} times: {1}. | |
4386 </summary> | |
4387 </member> | |
4388 <member name="P:Moq.Properties.Resources.NoMatchingCallsOnce"> | |
4389 <summary> | |
4390 Looks up a localized string similar to {0} | |
4391 Expected invocation on the mock once, but was {4} times: {1}. | |
4392 </summary> | |
4393 </member> | |
4394 <member name="P:Moq.Properties.Resources.NoSetup"> | |
4395 <summary> | |
4396 Looks up a localized string similar to All invocations on the mock must have a corresponding setup.. | |
4397 </summary> | |
4398 </member> | |
4399 <member name="P:Moq.Properties.Resources.ObjectInstanceNotMock"> | |
4400 <summary> | |
4401 Looks up a localized string similar to Object instance was not created by Moq.. | |
4402 </summary> | |
4403 </member> | |
4404 <member name="P:Moq.Properties.Resources.OutExpressionMustBeConstantValue"> | |
4405 <summary> | |
4406 Looks up a localized string similar to Out expression must evaluate to a constant value.. | |
4407 </summary> | |
4408 </member> | |
4409 <member name="P:Moq.Properties.Resources.PropertyGetNotFound"> | |
4410 <summary> | |
4411 Looks up a localized string similar to Property {0}.{1} does not have a getter.. | |
4412 </summary> | |
4413 </member> | |
4414 <member name="P:Moq.Properties.Resources.PropertyMissing"> | |
4415 <summary> | |
4416 Looks up a localized string similar to Property {0}.{1} does not exist.. | |
4417 </summary> | |
4418 </member> | |
4419 <member name="P:Moq.Properties.Resources.PropertyNotReadable"> | |
4420 <summary> | |
4421 Looks up a localized string similar to Property {0}.{1} is write-only.. | |
4422 </summary> | |
4423 </member> | |
4424 <member name="P:Moq.Properties.Resources.PropertyNotWritable"> | |
4425 <summary> | |
4426 Looks up a localized string similar to Property {0}.{1} is read-only.. | |
4427 </summary> | |
4428 </member> | |
4429 <member name="P:Moq.Properties.Resources.PropertySetNotFound"> | |
4430 <summary> | |
4431 Looks up a localized string similar to Property {0}.{1} does not have a setter.. | |
4432 </summary> | |
4433 </member> | |
4434 <member name="P:Moq.Properties.Resources.RaisedUnassociatedEvent"> | |
4435 <summary> | |
4436 Looks up a localized string similar to Cannot raise a mocked event unless it has been associated (attached) to a concrete event in a mocked object.. | |
4437 </summary> | |
4438 </member> | |
4439 <member name="P:Moq.Properties.Resources.RefExpressionMustBeConstantValue"> | |
4440 <summary> | |
4441 Looks up a localized string similar to Ref expression must evaluate to a constant value.. | |
4442 </summary> | |
4443 </member> | |
4444 <member name="P:Moq.Properties.Resources.ReturnValueRequired"> | |
4445 <summary> | |
4446 Looks up a localized string similar to Invocation needs to return a value and therefore must have a corresponding setup that provides it.. | |
4447 </summary> | |
4448 </member> | |
4449 <member name="P:Moq.Properties.Resources.SetupLambda"> | |
4450 <summary> | |
4451 Looks up a localized string similar to A lambda expression is expected as the argument to It.Is<T>.. | |
4452 </summary> | |
4453 </member> | |
4454 <member name="P:Moq.Properties.Resources.SetupNever"> | |
4455 <summary> | |
4456 Looks up a localized string similar to Invocation {0} should not have been made.. | |
4457 </summary> | |
4458 </member> | |
4459 <member name="P:Moq.Properties.Resources.SetupNotMethod"> | |
4460 <summary> | |
4461 Looks up a localized string similar to Expression is not a method invocation: {0}. | |
4462 </summary> | |
4463 </member> | |
4464 <member name="P:Moq.Properties.Resources.SetupNotProperty"> | |
4465 <summary> | |
4466 Looks up a localized string similar to Expression is not a property access: {0}. | |
4467 </summary> | |
4468 </member> | |
4469 <member name="P:Moq.Properties.Resources.SetupNotSetter"> | |
4470 <summary> | |
4471 Looks up a localized string similar to Expression is not a property setter invocation.. | |
4472 </summary> | |
4473 </member> | |
4474 <member name="P:Moq.Properties.Resources.SetupOnNonMemberMethod"> | |
4475 <summary> | |
4476 Looks up a localized string similar to Expression references a method that does not belong to the mocked object: {0}. | |
4477 </summary> | |
4478 </member> | |
4479 <member name="P:Moq.Properties.Resources.SetupOnNonOverridableMember"> | |
4480 <summary> | |
4481 Looks up a localized string similar to Invalid setup on a non-virtual (overridable in VB) member: {0}. | |
4482 </summary> | |
4483 </member> | |
4484 <member name="P:Moq.Properties.Resources.TypeNotImplementInterface"> | |
4485 <summary> | |
4486 Looks up a localized string similar to Type {0} does not implement required interface {1}. | |
4487 </summary> | |
4488 </member> | |
4489 <member name="P:Moq.Properties.Resources.TypeNotInheritFromType"> | |
4490 <summary> | |
4491 Looks up a localized string similar to Type {0} does not from required type {1}. | |
4492 </summary> | |
4493 </member> | |
4494 <member name="P:Moq.Properties.Resources.UnexpectedPublicProperty"> | |
4495 <summary> | |
4496 Looks up a localized string similar to To specify a setup for public property {0}.{1}, use the typed overloads, such as: | |
4497 mock.Setup(x => x.{1}).Returns(value); | |
4498 mock.SetupGet(x => x.{1}).Returns(value); //equivalent to previous one | |
4499 mock.SetupSet(x => x.{1}).Callback(callbackDelegate); | |
4500 . | |
4501 </summary> | |
4502 </member> | |
4503 <member name="P:Moq.Properties.Resources.UnsupportedExpression"> | |
4504 <summary> | |
4505 Looks up a localized string similar to Unsupported expression: {0}. | |
4506 </summary> | |
4507 </member> | |
4508 <member name="P:Moq.Properties.Resources.UnsupportedIntermediateExpression"> | |
4509 <summary> | |
4510 Looks up a localized string similar to Only property accesses are supported in intermediate invocations on a setup. Unsupported expression {0}.. | |
4511 </summary> | |
4512 </member> | |
4513 <member name="P:Moq.Properties.Resources.UnsupportedIntermediateType"> | |
4514 <summary> | |
4515 Looks up a localized string similar to Expression contains intermediate property access {0}.{1} which is of type {2} and cannot be mocked. Unsupported expression {3}.. | |
4516 </summary> | |
4517 </member> | |
4518 <member name="P:Moq.Properties.Resources.UnsupportedMatcherParamsForSetter"> | |
4519 <summary> | |
4520 Looks up a localized string similar to Setter expression cannot use argument matchers that receive parameters.. | |
4521 </summary> | |
4522 </member> | |
4523 <member name="P:Moq.Properties.Resources.UnsupportedMember"> | |
4524 <summary> | |
4525 Looks up a localized string similar to Member {0} is not supported for protected mocking.. | |
4526 </summary> | |
4527 </member> | |
4528 <member name="P:Moq.Properties.Resources.UnsupportedNonStaticMatcherForSetter"> | |
4529 <summary> | |
4530 Looks up a localized string similar to Setter expression can only use static custom matchers.. | |
4531 </summary> | |
4532 </member> | |
4533 <member name="P:Moq.Properties.Resources.VerficationFailed"> | |
4534 <summary> | |
4535 Looks up a localized string similar to The following setups were not matched: | |
4536 {0}. | |
4537 </summary> | |
4538 </member> | |
4539 <member name="P:Moq.Properties.Resources.VerifyOnNonVirtualMember"> | |
4540 <summary> | |
4541 Looks up a localized string similar to Invalid verify on a non-virtual (overridable in VB) member: {0}. | |
4542 </summary> | |
4543 </member> | |
4544 <member name="T:Moq.Protected.IProtectedMock`1"> | |
4545 <summary> | |
4546 Allows setups to be specified for protected members by using their | |
4547 name as a string, rather than strong-typing them which is not possible | |
4548 due to their visibility. | |
4549 </summary> | |
4550 </member> | |
4551 <member name="M:Moq.Protected.IProtectedMock`1.Setup(System.String,System.Object[])"> | |
4552 <summary> | |
4553 Specifies a setup for a void method invocation with the given | |
4554 <paramref name="voidMethodName"/>, optionally specifying arguments for the method call. | |
4555 </summary> | |
4556 <param name="voidMethodName">The name of the void method to be invoked.</param> | |
4557 <param name="args">The optional arguments for the invocation. If argument matchers are used, | |
4558 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param> | |
4559 </member> | |
4560 <member name="M:Moq.Protected.IProtectedMock`1.Setup``1(System.String,System.Object[])"> | |
4561 <summary> | |
4562 Specifies a setup for an invocation on a property or a non void method with the given | |
4563 <paramref name="methodOrPropertyName"/>, optionally specifying arguments for the method call. | |
4564 </summary> | |
4565 <param name="methodOrPropertyName">The name of the method or property to be invoked.</param> | |
4566 <param name="args">The optional arguments for the invocation. If argument matchers are used, | |
4567 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param> | |
4568 <typeparam name="TResult">The return type of the method or property.</typeparam> | |
4569 </member> | |
4570 <member name="M:Moq.Protected.IProtectedMock`1.SetupGet``1(System.String)"> | |
4571 <summary> | |
4572 Specifies a setup for an invocation on a property getter with the given | |
4573 <paramref name="propertyName"/>. | |
4574 </summary> | |
4575 <param name="propertyName">The name of the property.</param> | |
4576 <typeparam name="TProperty">The type of the property.</typeparam> | |
4577 </member> | |
4578 <member name="M:Moq.Protected.IProtectedMock`1.SetupSet``1(System.String,System.Object)"> | |
4579 <summary> | |
4580 Specifies a setup for an invocation on a property setter with the given | |
4581 <paramref name="propertyName"/>. | |
4582 </summary> | |
4583 <param name="propertyName">The name of the property.</param> | |
4584 <param name="value">The property value. If argument matchers are used, | |
4585 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param> | |
4586 <typeparam name="TProperty">The type of the property.</typeparam> | |
4587 </member> | |
4588 <member name="M:Moq.Protected.IProtectedMock`1.Verify(System.String,Moq.Times,System.Object[])"> | |
4589 <summary> | |
4590 Specifies a verify for a void method with the given <paramref name="methodName"/>, | |
4591 optionally specifying arguments for the method call. Use in conjuntion with the default | |
4592 <see cref="F:Moq.MockBehavior.Loose"/>. | |
4593 </summary> | |
4594 <exception cref="T:Moq.MockException">The invocation was not call the times specified by | |
4595 <paramref name="times"/>.</exception> | |
4596 <param name="methodName">The name of the void method to be verified.</param> | |
4597 <param name="times">The number of times a method is allowed to be called.</param> | |
4598 <param name="args">The optional arguments for the invocation. If argument matchers are used, | |
4599 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param> | |
4600 </member> | |
4601 <member name="M:Moq.Protected.IProtectedMock`1.Verify``1(System.String,Moq.Times,System.Object[])"> | |
4602 <summary> | |
4603 Specifies a verify for an invocation on a property or a non void method with the given | |
4604 <paramref name="methodName"/>, optionally specifying arguments for the method call. | |
4605 </summary> | |
4606 <exception cref="T:Moq.MockException">The invocation was not call the times specified by | |
4607 <paramref name="times"/>.</exception> | |
4608 <param name="methodName">The name of the method or property to be invoked.</param> | |
4609 <param name="args">The optional arguments for the invocation. If argument matchers are used, | |
4610 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param> | |
4611 <param name="times">The number of times a method is allowed to be called.</param> | |
4612 <typeparam name="TResult">The type of return value from the expression.</typeparam> | |
4613 </member> | |
4614 <member name="M:Moq.Protected.IProtectedMock`1.VerifyGet``1(System.String,Moq.Times)"> | |
4615 <summary> | |
4616 Specifies a verify for an invocation on a property getter with the given | |
4617 <paramref name="propertyName"/>. | |
4618 <exception cref="T:Moq.MockException">The invocation was not call the times specified by | |
4619 <paramref name="times"/>.</exception> | |
4620 </summary> | |
4621 <param name="propertyName">The name of the property.</param> | |
4622 <param name="times">The number of times a method is allowed to be called.</param> | |
4623 <typeparam name="TProperty">The type of the property.</typeparam> | |
4624 </member> | |
4625 <member name="M:Moq.Protected.IProtectedMock`1.VerifySet``1(System.String,Moq.Times,System.Object)"> | |
4626 <summary> | |
4627 Specifies a setup for an invocation on a property setter with the given | |
4628 <paramref name="propertyName"/>. | |
4629 </summary> | |
4630 <exception cref="T:Moq.MockException">The invocation was not call the times specified by | |
4631 <paramref name="times"/>.</exception> | |
4632 <param name="propertyName">The name of the property.</param> | |
4633 <param name="times">The number of times a method is allowed to be called.</param> | |
4634 <param name="value">The property value.</param> | |
4635 <typeparam name="TProperty">The type of the property. If argument matchers are used, | |
4636 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</typeparam> | |
4637 </member> | |
4638 <member name="T:Moq.Protected.ItExpr"> | |
4639 <summary> | |
4640 Allows the specification of a matching condition for an | |
4641 argument in a protected member setup, rather than a specific | |
4642 argument value. "ItExpr" refers to the argument being matched. | |
4643 </summary> | |
4644 <remarks> | |
4645 <para>Use this variant of argument matching instead of | |
4646 <see cref="T:Moq.It"/> for protected setups.</para> | |
4647 This class allows the setup to match a method invocation | |
4648 with an arbitrary value, with a value in a specified range, or | |
4649 even one that matches a given predicate, or null. | |
4650 </remarks> | |
4651 </member> | |
4652 <member name="M:Moq.Protected.ItExpr.IsNull``1"> | |
4653 <summary> | |
4654 Matches a null value of the given <typeparamref name="TValue"/> type. | |
4655 </summary> | |
4656 <remarks> | |
4657 Required for protected mocks as the null value cannot be used | |
4658 directly as it prevents proper method overload selection. | |
4659 </remarks> | |
4660 <example> | |
4661 <code> | |
4662 // Throws an exception for a call to Remove with a null string value. | |
4663 mock.Protected() | |
4664 .Setup("Remove", ItExpr.IsNull<string>()) | |
4665 .Throws(new InvalidOperationException()); | |
4666 </code> | |
4667 </example> | |
4668 <typeparam name="TValue">Type of the value.</typeparam> | |
4669 </member> | |
4670 <member name="M:Moq.Protected.ItExpr.IsAny``1"> | |
4671 <summary> | |
4672 Matches any value of the given <typeparamref name="TValue"/> type. | |
4673 </summary> | |
4674 <remarks> | |
4675 Typically used when the actual argument value for a method | |
4676 call is not relevant. | |
4677 </remarks> | |
4678 <example> | |
4679 <code> | |
4680 // Throws an exception for a call to Remove with any string value. | |
4681 mock.Protected() | |
4682 .Setup("Remove", ItExpr.IsAny<string>()) | |
4683 .Throws(new InvalidOperationException()); | |
4684 </code> | |
4685 </example> | |
4686 <typeparam name="TValue">Type of the value.</typeparam> | |
4687 </member> | |
4688 <member name="M:Moq.Protected.ItExpr.Is``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})"> | |
4689 <summary> | |
4690 Matches any value that satisfies the given predicate. | |
4691 </summary> | |
4692 <typeparam name="TValue">Type of the argument to check.</typeparam> | |
4693 <param name="match">The predicate used to match the method argument.</param> | |
4694 <remarks> | |
4695 Allows the specification of a predicate to perform matching | |
4696 of method call arguments. | |
4697 </remarks> | |
4698 <example> | |
4699 This example shows how to return the value <c>1</c> whenever the argument to the | |
4700 <c>Do</c> method is an even number. | |
4701 <code> | |
4702 mock.Protected() | |
4703 .Setup("Do", ItExpr.Is<int>(i => i % 2 == 0)) | |
4704 .Returns(1); | |
4705 </code> | |
4706 This example shows how to throw an exception if the argument to the | |
4707 method is a negative number: | |
4708 <code> | |
4709 mock.Protected() | |
4710 .Setup("GetUser", ItExpr.Is<int>(i => i < 0)) | |
4711 .Throws(new ArgumentException()); | |
4712 </code> | |
4713 </example> | |
4714 </member> | |
4715 <member name="M:Moq.Protected.ItExpr.IsInRange``1(``0,``0,Moq.Range)"> | |
4716 <summary> | |
4717 Matches any value that is in the range specified. | |
4718 </summary> | |
4719 <typeparam name="TValue">Type of the argument to check.</typeparam> | |
4720 <param name="from">The lower bound of the range.</param> | |
4721 <param name="to">The upper bound of the range.</param> | |
4722 <param name="rangeKind">The kind of range. See <see cref="T:Moq.Range"/>.</param> | |
4723 <example> | |
4724 The following example shows how to expect a method call | |
4725 with an integer argument within the 0..100 range. | |
4726 <code> | |
4727 mock.Protected() | |
4728 .Setup("HasInventory", | |
4729 ItExpr.IsAny<string>(), | |
4730 ItExpr.IsInRange(0, 100, Range.Inclusive)) | |
4731 .Returns(false); | |
4732 </code> | |
4733 </example> | |
4734 </member> | |
4735 <member name="M:Moq.Protected.ItExpr.IsRegex(System.String)"> | |
4736 <summary> | |
4737 Matches a string argument if it matches the given regular expression pattern. | |
4738 </summary> | |
4739 <param name="regex">The pattern to use to match the string argument value.</param> | |
4740 <example> | |
4741 The following example shows how to expect a call to a method where the | |
4742 string argument matches the given regular expression: | |
4743 <code> | |
4744 mock.Protected() | |
4745 .Setup("Check", ItExpr.IsRegex("[a-z]+")) | |
4746 .Returns(1); | |
4747 </code> | |
4748 </example> | |
4749 </member> | |
4750 <member name="M:Moq.Protected.ItExpr.IsRegex(System.String,System.Text.RegularExpressions.RegexOptions)"> | |
4751 <summary> | |
4752 Matches a string argument if it matches the given regular expression pattern. | |
4753 </summary> | |
4754 <param name="regex">The pattern to use to match the string argument value.</param> | |
4755 <param name="options">The options used to interpret the pattern.</param> | |
4756 <example> | |
4757 The following example shows how to expect a call to a method where the | |
4758 string argument matches the given regular expression, in a case insensitive way: | |
4759 <code> | |
4760 mock.Protected() | |
4761 .Setup("Check", ItExpr.IsRegex("[a-z]+", RegexOptions.IgnoreCase)) | |
4762 .Returns(1); | |
4763 </code> | |
4764 </example> | |
4765 </member> | |
4766 <member name="T:Moq.Protected.ProtectedExtension"> | |
4767 <summary> | |
4768 Enables the <c>Protected()</c> method on <see cref="T:Moq.Mock`1"/>, | |
4769 allowing setups to be set for protected members by using their | |
4770 name as a string, rather than strong-typing them which is not possible | |
4771 due to their visibility. | |
4772 </summary> | |
4773 </member> | |
4774 <member name="M:Moq.Protected.ProtectedExtension.Protected``1(Moq.Mock{``0})"> | |
4775 <summary> | |
4776 Enable protected setups for the mock. | |
4777 </summary> | |
4778 <typeparam name="T">Mocked object type. Typically omitted as it can be inferred from the mock instance.</typeparam> | |
4779 <param name="mock">The mock to set the protected setups on.</param> | |
4780 </member> | |
4781 <member name="T:ThisAssembly"> | |
4782 <group name="overview" title="Overview" order="0" /> | |
4783 <group name="setups" title="Specifying setups" order="1" /> | |
4784 <group name="returns" title="Returning values from members" order="2" /> | |
4785 <group name="verification" title="Verifying setups" order="3" /> | |
4786 <group name="advanced" title="Advanced scenarios" order="99" /> | |
4787 <group name="factory" title="Using MockFactory for consistency across mocks" order="4" /> | |
4788 </member> | |
4789 <member name="T:Moq.Range"> | |
4790 <summary> | |
4791 Kind of range to use in a filter specified through | |
4792 <see cref="M:Moq.It.IsInRange``1(``0,``0,Moq.Range)"/>. | |
4793 </summary> | |
4794 </member> | |
4795 <member name="F:Moq.Range.Inclusive"> | |
4796 <summary> | |
4797 The range includes the <c>to</c> and | |
4798 <c>from</c> values. | |
4799 </summary> | |
4800 </member> | |
4801 <member name="F:Moq.Range.Exclusive"> | |
4802 <summary> | |
4803 The range does not include the <c>to</c> and | |
4804 <c>from</c> values. | |
4805 </summary> | |
4806 </member> | |
4807 <member name="T:Moq.DefaultValue"> | |
4808 <summary> | |
4809 Determines the way default values are generated | |
4810 calculated for loose mocks. | |
4811 </summary> | |
4812 </member> | |
4813 <member name="F:Moq.DefaultValue.Empty"> | |
4814 <summary> | |
4815 Default behavior, which generates empty values for | |
4816 value types (i.e. default(int)), empty array and | |
4817 enumerables, and nulls for all other reference types. | |
4818 </summary> | |
4819 </member> | |
4820 <member name="F:Moq.DefaultValue.Mock"> | |
4821 <summary> | |
4822 Whenever the default value generated by <see cref="F:Moq.DefaultValue.Empty"/> | |
4823 is null, replaces this value with a mock (if the type | |
4824 can be mocked). | |
4825 </summary> | |
4826 <remarks> | |
4827 For sealed classes, a null value will be generated. | |
4828 </remarks> | |
4829 </member> | |
4830 <member name="T:Moq.Linq.MockQueryable`1"> | |
4831 <summary> | |
4832 A default implementation of IQueryable for use with QueryProvider | |
4833 </summary> | |
4834 </member> | |
4835 <member name="M:Moq.Linq.MockQueryable`1.#ctor(System.Linq.Expressions.MethodCallExpression)"> | |
4836 <summary> | |
4837 The <paramref name="underlyingCreateMocks"/> is a | |
4838 static method that returns an IQueryable of Mocks of T which is used to | |
4839 apply the linq specification to. | |
4840 </summary> | |
4841 </member> | |
4842 <member name="T:Moq.Match"> | |
4843 <summary> | |
4844 Allows creation custom value matchers that can be used on setups and verification, | |
4845 completely replacing the built-in <see cref="T:Moq.It"/> class with your own argument | |
4846 matching rules. | |
4847 </summary><remarks> | |
4848 See also <see cref="T:Moq.Match`1"/>. | |
4849 </remarks> | |
4850 </member> | |
4851 <member name="M:Moq.Match.Matcher``1"> | |
4852 <devdoc> | |
4853 Provided for the sole purpose of rendering the delegate passed to the | |
4854 matcher constructor if no friendly render lambda is provided. | |
4855 </devdoc> | |
4856 </member> | |
4857 <member name="M:Moq.Match.Create``1(System.Predicate{``0})"> | |
4858 <summary> | |
4859 Initializes the match with the condition that | |
4860 will be checked in order to match invocation | |
4861 values. | |
4862 </summary><param name="condition">The condition to match against actual values.</param><remarks> | |
4863 <seealso cref="T:Moq.Match`1"/> | |
4864 </remarks> | |
4865 </member> | |
4866 <member name="M:Moq.Match.Create``1(System.Predicate{``0},System.Linq.Expressions.Expression{System.Func{``0}})"> | |
4867 <!-- No matching elements were found for the following include tag --><include file="Match.xdoc" path="docs/doc[@for="Match.Create{T}(condition,renderExpression"]/*"/> | |
4868 </member> | |
4869 <member name="M:Moq.Match.SetLastMatch``1(Moq.Match{``0})"> | |
4870 <devdoc> | |
4871 This method is used to set an expression as the last matcher invoked, | |
4872 which is used in the SetupSet to allow matchers in the prop = value | |
4873 delegate expression. This delegate is executed in "fluent" mode in | |
4874 order to capture the value being set, and construct the corresponding | |
4875 methodcall. | |
4876 This is also used in the MatcherFactory for each argument expression. | |
4877 This method ensures that when we execute the delegate, we | |
4878 also track the matcher that was invoked, so that when we create the | |
4879 methodcall we build the expression using it, rather than the null/default | |
4880 value returned from the actual invocation. | |
4881 </devdoc> | |
4882 </member> | |
4883 <member name="T:Moq.Match`1"> | |
4884 <summary> | |
4885 Allows creation custom value matchers that can be used on setups and verification, | |
4886 completely replacing the built-in <see cref="T:Moq.It"/> class with your own argument | |
4887 matching rules. | |
4888 </summary><typeparam name="T">Type of the value to match.</typeparam><remarks> | |
4889 The argument matching is used to determine whether a concrete | |
4890 invocation in the mock matches a given setup. This | |
4891 matching mechanism is fully extensible. | |
4892 </remarks><example> | |
4893 Creating a custom matcher is straightforward. You just need to create a method | |
4894 that returns a value from a call to <see cref="M:Moq.Match.Create``1(System.Predicate{``0})"/> with | |
4895 your matching condition and optional friendly render expression: | |
4896 <code> | |
4897 [Matcher] | |
4898 public Order IsBigOrder() | |
4899 { | |
4900 return Match<Order>.Create( | |
4901 o => o.GrandTotal >= 5000, | |
4902 /* a friendly expression to render on failures */ | |
4903 () => IsBigOrder()); | |
4904 } | |
4905 </code> | |
4906 This method can be used in any mock setup invocation: | |
4907 <code> | |
4908 mock.Setup(m => m.Submit(IsBigOrder()).Throws<UnauthorizedAccessException>(); | |
4909 </code> | |
4910 At runtime, Moq knows that the return value was a matcher (note that the method MUST be | |
4911 annotated with the [Matcher] attribute in order to determine this) and | |
4912 evaluates your predicate with the actual value passed into your predicate. | |
4913 <para> | |
4914 Another example might be a case where you want to match a lists of orders | |
4915 that contains a particular one. You might create matcher like the following: | |
4916 </para> | |
4917 <code> | |
4918 public static class Orders | |
4919 { | |
4920 [Matcher] | |
4921 public static IEnumerable<Order> Contains(Order order) | |
4922 { | |
4923 return Match<IEnumerable<Order>>.Create(orders => orders.Contains(order)); | |
4924 } | |
4925 } | |
4926 </code> | |
4927 Now we can invoke this static method instead of an argument in an | |
4928 invocation: | |
4929 <code> | |
4930 var order = new Order { ... }; | |
4931 var mock = new Mock<IRepository<Order>>(); | |
4932 | |
4933 mock.Setup(x => x.Save(Orders.Contains(order))) | |
4934 .Throws<ArgumentException>(); | |
4935 </code> | |
4936 </example> | |
4937 </member> | |
4938 <member name="T:Moq.FluentMockContext"> | |
4939 <summary> | |
4940 Tracks the current mock and interception context. | |
4941 </summary> | |
4942 </member> | |
4943 <member name="P:Moq.FluentMockContext.IsActive"> | |
4944 <summary> | |
4945 Having an active fluent mock context means that the invocation | |
4946 is being performed in "trial" mode, just to gather the | |
4947 target method and arguments that need to be matched later | |
4948 when the actual invocation is made. | |
4949 </summary> | |
4950 </member> | |
4951 <member name="T:Moq.MockDefaultValueProvider"> | |
4952 <summary> | |
4953 A <see cref="T:Moq.IDefaultValueProvider"/> that returns an empty default value | |
4954 for non-mockeable types, and mocks for all other types (interfaces and | |
4955 non-sealed classes) that can be mocked. | |
4956 </summary> | |
4957 </member> | |
4958 <member name="T:Moq.Mocks"> | |
4959 <summary> | |
4960 Allows querying the universe of mocks for those that behave | |
4961 according to the LINQ query specification. | |
4962 </summary> | |
4963 <devdoc> | |
4964 This entry-point into Linq to Mocks is the only one in the root Moq | |
4965 namespace to ease discovery. But to get all the mocking extension | |
4966 methods on Object, a using of Moq.Linq must be done, so that the | |
4967 polluting of the intellisense for all objects is an explicit opt-in. | |
4968 </devdoc> | |
4969 </member> | |
4970 <member name="M:Moq.Mocks.Of``1"> | |
4971 <summary> | |
4972 Access the universe of mocks of the given type, to retrieve those | |
4973 that behave according to the LINQ query specification. | |
4974 </summary> | |
4975 <typeparam name="T">The type of the mocked object to query.</typeparam> | |
4976 </member> | |
4977 <member name="M:Moq.Mocks.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})"> | |
4978 <summary> | |
4979 Access the universe of mocks of the given type, to retrieve those | |
4980 that behave according to the LINQ query specification. | |
4981 </summary> | |
4982 <param name="specification">The predicate with the setup expressions.</param> | |
4983 <typeparam name="T">The type of the mocked object to query.</typeparam> | |
4984 </member> | |
4985 <member name="M:Moq.Mocks.OneOf``1"> | |
4986 <summary> | |
4987 Creates an mock object of the indicated type. | |
4988 </summary> | |
4989 <typeparam name="T">The type of the mocked object.</typeparam> | |
4990 <returns>The mocked object created.</returns> | |
4991 </member> | |
4992 <member name="M:Moq.Mocks.OneOf``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})"> | |
4993 <summary> | |
4994 Creates an mock object of the indicated type. | |
4995 </summary> | |
4996 <param name="specification">The predicate with the setup expressions.</param> | |
4997 <typeparam name="T">The type of the mocked object.</typeparam> | |
4998 <returns>The mocked object created.</returns> | |
4999 </member> | |
5000 <member name="M:Moq.Mocks.CreateMockQuery``1"> | |
5001 <summary> | |
5002 Creates the mock query with the underlying queriable implementation. | |
5003 </summary> | |
5004 </member> | |
5005 <member name="M:Moq.Mocks.CreateQueryable``1"> | |
5006 <summary> | |
5007 Wraps the enumerator inside a queryable. | |
5008 </summary> | |
5009 </member> | |
5010 <member name="M:Moq.Mocks.CreateMocks``1"> | |
5011 <summary> | |
5012 Method that is turned into the actual call from .Query{T}, to | |
5013 transform the queryable query into a normal enumerable query. | |
5014 This method is never used directly by consumers. | |
5015 </summary> | |
5016 </member> | |
5017 <member name="M:Moq.Mocks.SetPropery``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1)"> | |
5018 <summary> | |
5019 Extension method used to support Linq-like setup properties that are not virtual but do have | |
5020 a getter and a setter, thereby allowing the use of Linq to Mocks to quickly initialize Dtos too :) | |
5021 </summary> | |
5022 </member> | |
5023 <member name="T:Moq.QueryableMockExtensions"> | |
5024 <summary> | |
5025 Helper extensions that are used by the query translator. | |
5026 </summary> | |
5027 </member> | |
5028 <member name="M:Moq.QueryableMockExtensions.FluentMock``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})"> | |
5029 <summary> | |
5030 Retrieves a fluent mock from the given setup expression. | |
5031 </summary> | |
5032 </member> | |
5033 <member name="T:Moq.Times"> | |
5034 <summary> | |
5035 Defines the number of invocations allowed by a mocked method. | |
5036 </summary> | |
5037 </member> | |
5038 <member name="M:Moq.Times.AtLeast(System.Int32)"> | |
5039 <summary> | |
5040 Specifies that a mocked method should be invoked <paramref name="callCount"/> times as minimum. | |
5041 </summary><param name="callCount">The minimun number of times.</param><returns>An object defining the allowed number of invocations.</returns> | |
5042 </member> | |
5043 <member name="M:Moq.Times.AtLeastOnce"> | |
5044 <summary> | |
5045 Specifies that a mocked method should be invoked one time as minimum. | |
5046 </summary><returns>An object defining the allowed number of invocations.</returns> | |
5047 </member> | |
5048 <member name="M:Moq.Times.AtMost(System.Int32)"> | |
5049 <summary> | |
5050 Specifies that a mocked method should be invoked <paramref name="callCount"/> time as maximun. | |
5051 </summary><param name="callCount">The maximun number of times.</param><returns>An object defining the allowed number of invocations.</returns> | |
5052 </member> | |
5053 <member name="M:Moq.Times.AtMostOnce"> | |
5054 <summary> | |
5055 Specifies that a mocked method should be invoked one time as maximun. | |
5056 </summary><returns>An object defining the allowed number of invocations.</returns> | |
5057 </member> | |
5058 <member name="M:Moq.Times.Between(System.Int32,System.Int32,Moq.Range)"> | |
5059 <summary> | |
5060 Specifies that a mocked method should be invoked between <paramref name="callCountFrom"/> and | |
5061 <paramref name="callCountTo"/> times. | |
5062 </summary><param name="callCountFrom">The minimun number of times.</param><param name="callCountTo">The maximun number of times.</param><param name="rangeKind"> | |
5063 The kind of range. See <see cref="T:Moq.Range"/>. | |
5064 </param><returns>An object defining the allowed number of invocations.</returns> | |
5065 </member> | |
5066 <member name="M:Moq.Times.Exactly(System.Int32)"> | |
5067 <summary> | |
5068 Specifies that a mocked method should be invoked exactly <paramref name="callCount"/> times. | |
5069 </summary><param name="callCount">The times that a method or property can be called.</param><returns>An object defining the allowed number of invocations.</returns> | |
5070 </member> | |
5071 <member name="M:Moq.Times.Never"> | |
5072 <summary> | |
5073 Specifies that a mocked method should not be invoked. | |
5074 </summary><returns>An object defining the allowed number of invocations.</returns> | |
5075 </member> | |
5076 <member name="M:Moq.Times.Once"> | |
5077 <summary> | |
5078 Specifies that a mocked method should be invoked exactly one time. | |
5079 </summary><returns>An object defining the allowed number of invocations.</returns> | |
5080 </member> | |
5081 <member name="M:Moq.Times.Equals(System.Object)"> | |
5082 <summary> | |
5083 Determines whether the specified <see cref="T:System.Object"/> is equal to this instance. | |
5084 </summary><param name="obj"> | |
5085 The <see cref="T:System.Object"/> to compare with this instance. | |
5086 </param><returns> | |
5087 <c>true</c> if the specified <see cref="T:System.Object"/> is equal to this instance; otherwise, <c>false</c>. | |
5088 </returns> | |
5089 </member> | |
5090 <member name="M:Moq.Times.GetHashCode"> | |
5091 <summary> | |
5092 Returns a hash code for this instance. | |
5093 </summary><returns> | |
5094 A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. | |
5095 </returns> | |
5096 </member> | |
5097 <member name="M:Moq.Times.op_Equality(Moq.Times,Moq.Times)"> | |
5098 <summary> | |
5099 Determines whether two specified <see cref="T:Moq.Times"/> objects have the same value. | |
5100 </summary><param name="left"> | |
5101 The first <see cref="T:Moq.Times"/>. | |
5102 </param><param name="right"> | |
5103 The second <see cref="T:Moq.Times"/>. | |
5104 </param><returns> | |
5105 <c>true</c> if the value of left is the same as the value of right; otherwise, <c>false</c>. | |
5106 </returns> | |
5107 </member> | |
5108 <member name="M:Moq.Times.op_Inequality(Moq.Times,Moq.Times)"> | |
5109 <summary> | |
5110 Determines whether two specified <see cref="T:Moq.Times"/> objects have different values. | |
5111 </summary><param name="left"> | |
5112 The first <see cref="T:Moq.Times"/>. | |
5113 </param><param name="right"> | |
5114 The second <see cref="T:Moq.Times"/>. | |
5115 </param><returns> | |
5116 <c>true</c> if the value of left is different from the value of right; otherwise, <c>false</c>. | |
5117 </returns> | |
5118 </member> | |
5119 </members> | |
5120 </doc> |