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