annotate src/packages/Moq.4.1.1309.1617/lib/net40/Moq.xml @ 3:91d78452a4a0 default tip

sync
author cin
date Thu, 12 Feb 2015 00:20:38 +0300
parents 5bca2d201ad8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1 <?xml version="1.0"?>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2 <doc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3 <assembly>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4 <name>Moq</name>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5 </assembly>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
6 <members>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
7 <member name="T:Moq.Language.ISetupConditionResult`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
8 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
9 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
10 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
11 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
12 <member name="M:Moq.Language.ISetupConditionResult`1.Setup(System.Linq.Expressions.Expression{System.Action{`0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
13 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
14 The expectation will be considered only in the former condition.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
15 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
16 <param name="expression"></param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
17 <returns></returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
18 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
19 <member name="M:Moq.Language.ISetupConditionResult`1.Setup``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
20 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
21 The expectation will be considered only in the former condition.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
22 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
23 <typeparam name="TResult"></typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
24 <param name="expression"></param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
25 <returns></returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
26 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
27 <member name="M:Moq.Language.ISetupConditionResult`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
28 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
29 Setups the get.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
30 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
31 <typeparam name="TProperty">The type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
32 <param name="expression">The expression.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
33 <returns></returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
34 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
35 <member name="M:Moq.Language.ISetupConditionResult`1.SetupSet``1(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
36 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
37 Setups the set.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
38 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
39 <typeparam name="TProperty">The type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
40 <param name="setterExpression">The setter expression.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
41 <returns></returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
42 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
43 <member name="M:Moq.Language.ISetupConditionResult`1.SetupSet(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
44 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
45 Setups the set.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
46 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
47 <param name="setterExpression">The setter expression.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
48 <returns></returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
49 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
50 <member name="M:Moq.IInterceptStrategy.HandleIntercept(Moq.Proxy.ICallContext,Moq.InterceptStrategyContext)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
51 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
52 Handle interception
5bca2d201ad8 initial commit
cin
parents:
diff changeset
53 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
54 <param name="invocation">the current invocation context</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
55 <param name="ctx">shared data among the strategies during an interception</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
56 <returns>true if further interception has to be processed, otherwise false</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
57 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
58 <member name="T:Moq.IMock`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
59 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
60 Covarient interface for Mock&lt;T&gt; such that casts between IMock&lt;Employee&gt; to IMock&lt;Person&gt;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
61 are possible. Only covers the covariant members of Mock&lt;T&gt;.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
62 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
63 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
64 <member name="P:Moq.IMock`1.Object">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
65 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
66 Exposes the mocked object instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
67 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
68 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
69 <member name="P:Moq.IMock`1.Behavior">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
70 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
71 Behavior of the mock, according to the value set in the constructor.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
72 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
73 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
74 <member name="P:Moq.IMock`1.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
75 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
76 Whether the base member virtual implementation will be called
5bca2d201ad8 initial commit
cin
parents:
diff changeset
77 for mocked classes if no setup is matched. Defaults to <see langword="false"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
78 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
79 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
80 <member name="P:Moq.IMock`1.DefaultValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
81 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
82 Specifies the behavior to use when returning default values for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
83 unexpected invocations on loose mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
84 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
85 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
86 <member name="M:Moq.AddActualInvocation.GetEventFromName(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
87 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
88 Get an eventInfo for a given event name. Search type ancestors depth first if necessary.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
89 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
90 <param name="eventName">Name of the event, with the set_ or get_ prefix already removed</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
91 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
92 <member name="M:Moq.AddActualInvocation.GetNonPublicEventFromName(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
93 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
94 Get an eventInfo for a given event name. Search type ancestors depth first if necessary.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
95 Searches also in non public events.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
96 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
97 <param name="eventName">Name of the event, with the set_ or get_ prefix already removed</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
98 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
99 <member name="M:Moq.AddActualInvocation.GetAncestorTypes(System.Type)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
100 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
101 Given a type return all of its ancestors, both types and interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
102 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
103 <param name="initialType">The type to find immediate ancestors of</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
104 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
105 <member name="T:Moq.Language.ICallback">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
106 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
107 Defines the <c>Callback</c> verb and overloads.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
108 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
109 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
110 <member name="T:Moq.IHideObjectMembers">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
111 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
112 Helper interface used to hide the base <see cref="T:System.Object"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
113 members from the fluent API to make it much cleaner
5bca2d201ad8 initial commit
cin
parents:
diff changeset
114 in Visual Studio intellisense.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
115 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
116 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
117 <member name="M:Moq.IHideObjectMembers.GetType">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
118 <summary/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
119 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
120 <member name="M:Moq.IHideObjectMembers.GetHashCode">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
121 <summary/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
122 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
123 <member name="M:Moq.IHideObjectMembers.ToString">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
124 <summary/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
125 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
126 <member name="M:Moq.IHideObjectMembers.Equals(System.Object)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
127 <summary/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
128 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
129 <member name="M:Moq.Language.ICallback.Callback(System.Action)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
130 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
131 Specifies a callback to invoke when the method is called.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
132 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
133 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
134 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
135 The following example specifies a callback to set a boolean
5bca2d201ad8 initial commit
cin
parents:
diff changeset
136 value that can be used later:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
137 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
138 var called = false;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
139 mock.Setup(x => x.Execute())
5bca2d201ad8 initial commit
cin
parents:
diff changeset
140 .Callback(() => called = true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
141 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
142 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
143 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
144 <member name="M:Moq.Language.ICallback.Callback``1(System.Action{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
145 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
146 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
147 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
148 <typeparam name="T">The argument type of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
149 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
150 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
151 Invokes the given callback with the concrete invocation argument value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
152 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
153 Notice how the specific string argument is retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
154 it as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
155 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
156 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
157 mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
158 .Callback((string command) => Console.WriteLine(command));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
159 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
160 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
161 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
162 <member name="M:Moq.Language.ICallback.Callback``2(System.Action{``0,``1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
163 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
164 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
165 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
166 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
167 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
168 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
169 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
170 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
171 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
172 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
173 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
174 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
175 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
176 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
177 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
178 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
179 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
180 .Callback((string arg1, string arg2) =&gt; Console.WriteLine(arg1 + arg2));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
181 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
182 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
183 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
184 <member name="M:Moq.Language.ICallback.Callback``3(System.Action{``0,``1,``2})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
185 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
186 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
187 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
188 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
189 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
190 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
191 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
192 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
193 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
194 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
195 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
196 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
197 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
198 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
199 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
200 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
201 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
202 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
203 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
204 .Callback((string arg1, string arg2, string arg3) =&gt; Console.WriteLine(arg1 + arg2 + arg3));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
205 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
206 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
207 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
208 <member name="M:Moq.Language.ICallback.Callback``4(System.Action{``0,``1,``2,``3})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
209 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
210 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
211 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
212 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
213 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
214 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
215 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
216 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
217 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
218 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
219 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
220 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
221 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
222 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
223 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
224 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
225 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
226 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
227 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
228 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
229 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
230 .Callback((string arg1, string arg2, string arg3, string arg4) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
231 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
232 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
233 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
234 <member name="M:Moq.Language.ICallback.Callback``5(System.Action{``0,``1,``2,``3,``4})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
235 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
236 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
237 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
238 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
239 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
240 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
241 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
242 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
243 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
244 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
245 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
246 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
247 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
248 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
249 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
250 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
251 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
252 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
253 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
254 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
255 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
256 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
257 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
258 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
259 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
260 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
261 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
262 <member name="M:Moq.Language.ICallback.Callback``6(System.Action{``0,``1,``2,``3,``4,``5})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
263 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
264 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
265 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
266 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
267 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
268 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
269 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
270 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
271 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
272 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
273 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
274 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
275 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
276 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
277 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
278 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
279 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
280 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
281 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
282 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
283 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
284 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
285 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
286 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
287 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
288 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
289 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
290 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
291 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
292 <member name="M:Moq.Language.ICallback.Callback``7(System.Action{``0,``1,``2,``3,``4,``5,``6})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
293 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
294 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
295 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
296 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
297 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
298 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
299 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
300 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
301 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
302 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
303 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
304 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
305 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
306 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
307 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
308 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
309 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
310 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
311 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
312 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
313 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
314 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
315 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
316 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
317 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
318 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
319 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
320 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
321 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
322 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
323 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
324 <member name="M:Moq.Language.ICallback.Callback``8(System.Action{``0,``1,``2,``3,``4,``5,``6,``7})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
325 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
326 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
327 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
328 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
329 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
330 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
331 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
332 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
333 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
334 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
335 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
336 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
337 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
338 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
339 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
340 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
341 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
342 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
343 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
344 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
345 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
346 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
347 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
348 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
349 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
350 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
351 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
352 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
353 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
354 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
355 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
356 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
357 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
358 <member name="M:Moq.Language.ICallback.Callback``9(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
359 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
360 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
361 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
362 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
363 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
364 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
365 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
366 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
367 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
368 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
369 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
370 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
371 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
372 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
373 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
374 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
375 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
376 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
377 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
378 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
379 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
380 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
381 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
382 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
383 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
384 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
385 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
386 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
387 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
388 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
389 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
390 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
391 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
392 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
393 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
394 <member name="M:Moq.Language.ICallback.Callback``10(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
395 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
396 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
397 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
398 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
399 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
400 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
401 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
402 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
403 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
404 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
405 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
406 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
407 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
408 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
409 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
410 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
411 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
412 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
413 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
414 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
415 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
416 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
417 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
418 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
419 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
420 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
421 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
422 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
423 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
424 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
425 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
426 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
427 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
428 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
429 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
430 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
431 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
432 <member name="M:Moq.Language.ICallback.Callback``11(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
433 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
434 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
435 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
436 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
437 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
438 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
439 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
440 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
441 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
442 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
443 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
444 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
445 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
446 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
447 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
448 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
449 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
450 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
451 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
452 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
453 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
454 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
455 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
456 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
457 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
458 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
459 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
460 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
461 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
462 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
463 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
464 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
465 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
466 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
467 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
468 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
469 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
470 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
471 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
472 <member name="M:Moq.Language.ICallback.Callback``12(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
473 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
474 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
475 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
476 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
477 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
478 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
479 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
480 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
481 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
482 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
483 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
484 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
485 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
486 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
487 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
488 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
489 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
490 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
491 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
492 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
493 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
494 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
495 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
496 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
497 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
498 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
499 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
500 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
501 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
502 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
503 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
504 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
505 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
506 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
507 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
508 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
509 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
510 .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) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
511 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
512 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
513 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
514 <member name="M:Moq.Language.ICallback.Callback``13(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
515 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
516 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
517 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
518 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
519 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
520 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
521 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
522 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
523 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
524 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
525 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
526 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
527 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
528 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
529 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
530 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
531 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
532 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
533 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
534 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
535 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
536 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
537 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
538 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
539 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
540 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
541 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
542 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
543 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
544 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
545 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
546 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
547 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
548 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
549 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
550 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
551 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
552 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
553 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
554 .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) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
555 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
556 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
557 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
558 <member name="M:Moq.Language.ICallback.Callback``14(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
559 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
560 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
561 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
562 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
563 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
564 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
565 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
566 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
567 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
568 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
569 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
570 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
571 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
572 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
573 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
574 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
575 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
576 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
577 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
578 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
579 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
580 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
581 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
582 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
583 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
584 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
585 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
586 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
587 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
588 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
589 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
590 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
591 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
592 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
593 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
594 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
595 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
596 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
597 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
598 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
599 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
600 .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) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
601 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
602 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
603 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
604 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
605 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
606 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
607 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
608 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
609 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
610 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
611 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
612 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
613 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
614 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
615 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
616 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
617 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
618 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
619 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
620 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
621 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
622 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
623 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
624 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
625 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
626 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
627 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
628 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
629 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
630 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
631 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
632 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
633 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
634 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
635 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
636 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
637 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
638 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
639 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
640 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
641 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
642 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
643 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
644 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
645 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
646 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
647 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
648 .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) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
649 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
650 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
651 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
652 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
653 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
654 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
655 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
656 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
657 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
658 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
659 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
660 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
661 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
662 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
663 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
664 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
665 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
666 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
667 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
668 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
669 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
670 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
671 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
672 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
673 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
674 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
675 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
676 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
677 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
678 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
679 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
680 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
681 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
682 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
683 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
684 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
685 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
686 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
687 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
688 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
689 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
690 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
691 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
692 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
693 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
694 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
695 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
696 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
697 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
698 .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) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
699 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
700 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
701 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
702 <member name="T:Moq.Language.ICallback`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
703 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
704 Defines the <c>Callback</c> verb and overloads for callbacks on
5bca2d201ad8 initial commit
cin
parents:
diff changeset
705 setups that return a value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
706 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
707 <typeparam name="TMock">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
708 <typeparam name="TResult">Type of the return value of the setup.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
709 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
710 <member name="M:Moq.Language.ICallback`2.Callback(System.Action)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
711 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
712 Specifies a callback to invoke when the method is called.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
713 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
714 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
715 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
716 The following example specifies a callback to set a boolean value that can be used later:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
717 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
718 var called = false;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
719 mock.Setup(x => x.Execute())
5bca2d201ad8 initial commit
cin
parents:
diff changeset
720 .Callback(() => called = true)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
721 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
722 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
723 Note that in the case of value-returning methods, after the <c>Callback</c>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
724 call you can still specify the return value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
725 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
726 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
727 <member name="M:Moq.Language.ICallback`2.Callback``1(System.Action{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
728 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
729 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
730 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
731 <typeparam name="T">The type of the argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
732 <param name="action">Callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
733 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
734 Invokes the given callback with the concrete invocation argument value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
735 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
736 Notice how the specific string argument is retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
737 it as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
738 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
739 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
740 mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
741 .Callback(command => Console.WriteLine(command))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
742 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
743 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
744 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
745 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
746 <member name="M:Moq.Language.ICallback`2.Callback``2(System.Action{``0,``1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
747 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
748 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
749 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
750 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
751 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
752 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
753 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
754 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
755 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
756 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
757 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
758 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
759 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
760 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
761 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
762 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
763 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
764 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
765 .Callback((arg1, arg2) =&gt; Console.WriteLine(arg1 + arg2));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
766 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
767 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
768 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
769 <member name="M:Moq.Language.ICallback`2.Callback``3(System.Action{``0,``1,``2})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
770 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
771 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
772 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
773 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
774 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
775 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
776 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
777 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
778 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
779 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
780 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
781 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
782 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
783 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
784 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
785 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
786 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
787 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
788 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
789 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
790 .Callback((arg1, arg2, arg3) =&gt; Console.WriteLine(arg1 + arg2 + arg3));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
791 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
792 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
793 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
794 <member name="M:Moq.Language.ICallback`2.Callback``4(System.Action{``0,``1,``2,``3})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
795 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
796 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
797 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
798 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
799 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
800 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
801 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
802 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
803 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
804 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
805 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
806 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
807 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
808 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
809 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
810 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
811 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
812 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
813 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
814 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
815 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
816 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
817 .Callback((arg1, arg2, arg3, arg4) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
818 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
819 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
820 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
821 <member name="M:Moq.Language.ICallback`2.Callback``5(System.Action{``0,``1,``2,``3,``4})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
822 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
823 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
824 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
825 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
826 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
827 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
828 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
829 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
830 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
831 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
832 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
833 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
834 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
835 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
836 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
837 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
838 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
839 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
840 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
841 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
842 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
843 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
844 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
845 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
846 .Callback((arg1, arg2, arg3, arg4, arg5) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
847 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
848 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
849 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
850 <member name="M:Moq.Language.ICallback`2.Callback``6(System.Action{``0,``1,``2,``3,``4,``5})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
851 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
852 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
853 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
854 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
855 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
856 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
857 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
858 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
859 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
860 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
861 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
862 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
863 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
864 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
865 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
866 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
867 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
868 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
869 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
870 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
871 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
872 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
873 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
874 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
875 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
876 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
877 .Callback((arg1, arg2, arg3, arg4, arg5, arg6) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
878 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
879 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
880 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
881 <member name="M:Moq.Language.ICallback`2.Callback``7(System.Action{``0,``1,``2,``3,``4,``5,``6})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
882 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
883 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
884 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
885 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
886 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
887 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
888 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
889 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
890 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
891 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
892 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
893 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
894 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
895 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
896 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
897 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
898 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
899 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
900 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
901 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
902 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
903 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
904 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
905 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
906 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
907 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
908 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
909 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
910 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
911 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
912 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
913 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
914 <member name="M:Moq.Language.ICallback`2.Callback``8(System.Action{``0,``1,``2,``3,``4,``5,``6,``7})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
915 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
916 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
917 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
918 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
919 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
920 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
921 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
922 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
923 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
924 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
925 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
926 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
927 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
928 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
929 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
930 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
931 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
932 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
933 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
934 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
935 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
936 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
937 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
938 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
939 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
940 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
941 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
942 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
943 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
944 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
945 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
946 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
947 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
948 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
949 <member name="M:Moq.Language.ICallback`2.Callback``9(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
950 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
951 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
952 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
953 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
954 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
955 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
956 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
957 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
958 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
959 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
960 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
961 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
962 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
963 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
964 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
965 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
966 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
967 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
968 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
969 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
970 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
971 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
972 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
973 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
974 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
975 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
976 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
977 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
978 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
979 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
980 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
981 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
982 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
983 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
984 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
985 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
986 <member name="M:Moq.Language.ICallback`2.Callback``10(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
987 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
988 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
989 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
990 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
991 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
992 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
993 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
994 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
995 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
996 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
997 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
998 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
999 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1000 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1001 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1002 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1003 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1004 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1005 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1006 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1007 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1008 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1009 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1010 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1011 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1012 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1013 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1014 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1015 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1016 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1017 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1018 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1019 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1020 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1021 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1022 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1023 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1024 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1025 <member name="M:Moq.Language.ICallback`2.Callback``11(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1026 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1027 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1028 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1029 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1030 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1031 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1032 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1033 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1034 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1035 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1036 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1037 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1038 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1039 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1040 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1041 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1042 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1043 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1044 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1045 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1046 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1047 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1048 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1049 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1050 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1051 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1052 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1053 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1054 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1055 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1056 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1057 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1058 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1059 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1060 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1061 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1062 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1063 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1064 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1065 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1066 <member name="M:Moq.Language.ICallback`2.Callback``12(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1067 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1068 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1069 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1070 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1071 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1072 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1073 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1074 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1075 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1076 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1077 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1078 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1079 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1080 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1081 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1082 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1083 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1084 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1085 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1086 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1087 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1088 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1089 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1090 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1091 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1092 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1093 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1094 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1095 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1096 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1097 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1098 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1099 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1100 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1101 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1102 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1103 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1104 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1105 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1106 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1107 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1108 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1109 <member name="M:Moq.Language.ICallback`2.Callback``13(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1110 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1111 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1112 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1113 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1114 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1115 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1116 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1117 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1118 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1119 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1120 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1121 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1122 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1123 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1124 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1125 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1126 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1127 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1128 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1129 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1130 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1131 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1132 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1133 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1134 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1135 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1136 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1137 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1138 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1139 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1140 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1141 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1142 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1143 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1144 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1145 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1146 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1147 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1148 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1149 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1150 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1151 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1152 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1153 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1154 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1155 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1156 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1157 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1158 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1159 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1160 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1161 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1162 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1163 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1164 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1165 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1166 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1167 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1168 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1169 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1170 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1171 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1172 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1173 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1174 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1175 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1176 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1177 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1178 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1179 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1180 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1181 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1182 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1183 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1184 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1185 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1186 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1187 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1188 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1189 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1190 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1191 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1192 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1193 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1194 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1195 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1196 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1197 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1198 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1199 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1200 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1201 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1202 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1203 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1204 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1205 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1206 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1207 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1208 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1209 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1210 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1211 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1212 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1213 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1214 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1215 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1216 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1217 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1218 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1219 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1220 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1221 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1222 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1223 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1224 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1225 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1226 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1227 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1228 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1229 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1230 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1231 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1232 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1233 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1234 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1235 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1236 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1237 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1238 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1239 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1240 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1241 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1242 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1243 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1244 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1245 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1246 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1247 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1248 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1249 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1250 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1251 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1252 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1253 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1254 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1255 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1256 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1257 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1258 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1259 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1260 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1261 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1262 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1263 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1264 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1265 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1266 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1267 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1268 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1269 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1270 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1271 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1272 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1273 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1274 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1275 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1276 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1277 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1278 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1279 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1280 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1281 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1282 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1283 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1284 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1285 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1286 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1287 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1288 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1289 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1290 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1291 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1292 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1293 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1294 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1295 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1296 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1297 .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1298 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1299 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1300 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1301 <member name="T:Moq.Language.IRaise`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1302 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1303 Defines the <c>Raises</c> verb.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1304 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1305 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1306 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1307 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1308 Specifies the event that will be raised
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1309 when the setup is met.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1310 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1311 <param name="eventExpression">An expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1312 <param name="args">The event arguments to pass for the raised event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1313 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1314 The following example shows how to raise an event when
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1315 the setup is met:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1316 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1317 var mock = new Mock&lt;IContainer&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1318
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1319 mock.Setup(add => add.Add(It.IsAny&lt;string&gt;(), It.IsAny&lt;object&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1320 .Raises(add => add.Added += null, EventArgs.Empty);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1321 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1322 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1323 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1324 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.Func{System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1325 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1326 Specifies the event that will be raised
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1327 when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1328 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1329 <param name="eventExpression">An expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1330 <param name="func">A function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1331 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1332 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1333 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1334 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1335 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1336 Specifies the custom event that will be raised
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1337 when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1338 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1339 <param name="eventExpression">An expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1340 <param name="args">The arguments to pass to the custom delegate (non EventHandler-compatible).</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1341 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1342 <member name="M:Moq.Language.IRaise`1.Raises``1(System.Action{`0},System.Func{``0,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1343 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1344 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1345 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1346 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1347 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1348 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1349 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1350 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1351 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1352 <member name="M:Moq.Language.IRaise`1.Raises``2(System.Action{`0},System.Func{``0,``1,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1353 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1354 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1355 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1356 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1357 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1358 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1359 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1360 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1361 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1362 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1363 <member name="M:Moq.Language.IRaise`1.Raises``3(System.Action{`0},System.Func{``0,``1,``2,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1364 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1365 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1366 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1367 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1368 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1369 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1370 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1371 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1372 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1373 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1374 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1375 <member name="M:Moq.Language.IRaise`1.Raises``4(System.Action{`0},System.Func{``0,``1,``2,``3,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1376 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1377 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1378 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1379 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1380 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1381 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1382 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1383 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1384 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1385 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1386 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1387 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1388 <member name="M:Moq.Language.IRaise`1.Raises``5(System.Action{`0},System.Func{``0,``1,``2,``3,``4,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1389 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1390 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1391 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1392 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1393 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1394 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1395 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1396 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1397 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1398 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1399 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1400 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1401 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1402 <member name="M:Moq.Language.IRaise`1.Raises``6(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1403 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1404 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1405 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1406 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1407 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1408 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1409 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1410 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1411 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1412 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1413 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1414 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1415 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1416 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1417 <member name="M:Moq.Language.IRaise`1.Raises``7(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1418 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1419 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1420 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1421 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1422 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1423 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1424 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1425 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1426 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1427 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1428 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1429 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1430 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1431 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1432 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1433 <member name="M:Moq.Language.IRaise`1.Raises``8(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1434 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1435 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1436 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1437 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1438 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1439 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1440 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1441 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1442 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1443 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1444 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1445 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1446 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1447 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1448 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1449 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1450 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1451 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1452 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1453 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1454 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1455 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1456 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1457 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1458 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1459 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1460 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1461 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1462 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1463 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1464 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1465 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1466 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1467 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1468 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1469 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1470 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1471 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1472 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1473 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1474 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1475 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1476 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1477 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1478 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1479 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1480 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1481 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1482 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1483 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1484 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1485 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1486 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1487 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1488 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1489 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1490 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1491 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1492 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1493 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1494 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1495 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1496 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1497 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1498 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1499 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1500 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1501 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1502 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1503 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1504 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1505 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1506 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1507 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1508 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1509 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1510 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1511 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1512 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1513 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1514 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1515 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1516 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1517 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1518 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1519 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1520 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1521 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1522 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1523 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1524 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1525 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1526 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1527 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1528 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1529 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1530 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1531 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1532 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1533 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1534 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1535 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1536 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1537 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1538 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1539 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1540 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1541 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1542 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1543 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1544 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1545 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1546 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1547 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1548 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1549 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1550 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1551 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1552 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1553 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1554 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1555 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1556 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1557 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1558 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1559 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1560 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1561 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1562 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1563 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1564 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1565 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1566 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1567 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1568 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1569 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1570 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1571 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1572 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1573 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1574 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1575 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1576 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1577 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1578 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1579 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1580 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1581 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1582 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1583 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1584 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1585 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1586 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1587 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1588 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1589 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1590 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1591 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1592 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1593 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1594 <typeparam name="T15">The type of the fifteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1595 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1596 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1597 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1598 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1599 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1600 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1601 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1602 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1603 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1604 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1605 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1606 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1607 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1608 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1609 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1610 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1611 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1612 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1613 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1614 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1615 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1616 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1617 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1618 <typeparam name="T15">The type of the fifteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1619 <typeparam name="T16">The type of the sixteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1620 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1621 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1622 <member name="T:Moq.Language.IReturns`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1623 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1624 Defines the <c>Returns</c> verb.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1625 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1626 <typeparam name="TMock">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1627 <typeparam name="TResult">Type of the return value from the expression.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1628 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1629 <member name="M:Moq.Language.IReturns`2.Returns(`1)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1630 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1631 Specifies the value to return.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1632 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1633 <param name="value">The value to return, or <see langword="null"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1634 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1635 Return a <c>true</c> value from the method call:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1636 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1637 mock.Setup(x => x.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1638 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1639 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1640 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1641 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1642 <member name="M:Moq.Language.IReturns`2.Returns(System.Func{`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1643 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1644 Specifies a function that will calculate the value to return from the method.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1645 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1646 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1647 <example group="returns">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1648 Return a calculated value when the method is called:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1649 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1650 mock.Setup(x => x.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1651 .Returns(() => returnValues[0]);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1652 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1653 The lambda expression to retrieve the return value is lazy-executed,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1654 meaning that its value may change depending on the moment the method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1655 is executed and the value the <c>returnValues</c> array has at
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1656 that moment.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1657 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1658 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1659 <member name="M:Moq.Language.IReturns`2.Returns``1(System.Func{``0,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1660 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1661 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1662 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1663 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1664 <typeparam name="T">The type of the argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1665 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1666 <example group="returns">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1667 Return a calculated value which is evaluated lazily at the time of the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1668 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1669 The lookup list can change between invocations and the setup
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1670 will return different values accordingly. Also, notice how the specific
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1671 string argument is retrieved by simply declaring it as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1672 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1673 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1674 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1675 mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1676 .Returns((string command) => returnValues[command]);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1677 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1678 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1679 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1680 <member name="M:Moq.Language.IReturns`2.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1681 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1682 Calls the real method of the object and returns its return value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1683 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1684 <returns>The value calculated by the real method of the object.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1685 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1686 <member name="M:Moq.Language.IReturns`2.Returns``2(System.Func{``0,``1,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1687 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1688 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1689 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1690 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1691 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1692 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1693 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1694 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1695 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1696 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1697 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1698 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1699 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1700 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1701 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1702 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1703 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1704 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1705 .Returns((string arg1, string arg2) => arg1 + arg2);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1706 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1707 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1708 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1709 <member name="M:Moq.Language.IReturns`2.Returns``3(System.Func{``0,``1,``2,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1710 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1711 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1712 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1713 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1714 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1715 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1716 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1717 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1718 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1719 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1720 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1721 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1722 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1723 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1724 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1725 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1726 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1727 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1728 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1729 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1730 .Returns((string arg1, string arg2, string arg3) => arg1 + arg2 + arg3);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1731 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1732 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1733 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1734 <member name="M:Moq.Language.IReturns`2.Returns``4(System.Func{``0,``1,``2,``3,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1735 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1736 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1737 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1738 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1739 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1740 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1741 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1742 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1743 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1744 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1745 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1746 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1747 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1748 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1749 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1750 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1751 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1752 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1753 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1754 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1755 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1756 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1757 .Returns((string arg1, string arg2, string arg3, string arg4) => arg1 + arg2 + arg3 + arg4);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1758 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1759 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1760 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1761 <member name="M:Moq.Language.IReturns`2.Returns``5(System.Func{``0,``1,``2,``3,``4,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1762 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1763 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1764 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1765 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1766 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1767 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1768 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1769 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1770 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1771 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1772 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1773 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1774 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1775 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1776 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1777 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1778 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1779 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1780 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1781 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1782 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1783 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1784 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1785 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1786 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5) => arg1 + arg2 + arg3 + arg4 + arg5);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1787 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1788 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1789 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1790 <member name="M:Moq.Language.IReturns`2.Returns``6(System.Func{``0,``1,``2,``3,``4,``5,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1791 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1792 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1793 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1794 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1795 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1796 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1797 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1798 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1799 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1800 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1801 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1802 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1803 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1804 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1805 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1806 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1807 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1808 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1809 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1810 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1811 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1812 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1813 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1814 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1815 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1816 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1817 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1818 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1819 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1820 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1821 <member name="M:Moq.Language.IReturns`2.Returns``7(System.Func{``0,``1,``2,``3,``4,``5,``6,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1822 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1823 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1824 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1825 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1826 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1827 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1828 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1829 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1830 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1831 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1832 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1833 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1834 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1835 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1836 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1837 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1838 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1839 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1840 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1841 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1842 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1843 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1844 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1845 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1846 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1847 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1848 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1849 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1850 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1851 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1852 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1853 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1854 <member name="M:Moq.Language.IReturns`2.Returns``8(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1855 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1856 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1857 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1858 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1859 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1860 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1861 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1862 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1863 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1864 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1865 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1866 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1867 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1868 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1869 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1870 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1871 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1872 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1873 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1874 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1875 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1876 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1877 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1878 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1879 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1880 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1881 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1882 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1883 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1884 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1885 .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);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1886 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1887 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1888 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1889 <member name="M:Moq.Language.IReturns`2.Returns``9(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1890 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1891 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1892 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1893 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1894 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1895 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1896 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1897 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1898 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1899 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1900 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1901 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1902 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1903 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1904 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1905 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1906 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1907 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1908 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1909 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1910 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1911 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1912 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1913 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1914 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1915 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1916 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1917 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1918 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1919 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1920 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1921 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1922 .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);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1923 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1924 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1925 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1926 <member name="M:Moq.Language.IReturns`2.Returns``10(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1927 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1928 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1929 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1930 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1931 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1932 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1933 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1934 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1935 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1936 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1937 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1938 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1939 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1940 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1941 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1942 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1943 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1944 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1945 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1946 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1947 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1948 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1949 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1950 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1951 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1952 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1953 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1954 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1955 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1956 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1957 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1958 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1959 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1960 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1961 .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);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1962 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1963 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1964 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1965 <member name="M:Moq.Language.IReturns`2.Returns``11(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1966 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1967 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1968 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1969 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1970 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1971 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1972 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1973 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1974 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1975 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1976 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1977 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1978 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1979 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1980 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1981 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1982 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1983 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1984 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1985 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1986 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1987 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1988 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1989 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1990 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1991 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1992 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1993 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1994 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1995 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1996 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1997 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1998 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1999 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2000 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2001 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2002 .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);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2003 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2004 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2005 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2006 <member name="M:Moq.Language.IReturns`2.Returns``12(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2007 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2008 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2009 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2010 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2011 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2012 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2013 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2014 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2015 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2016 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2017 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2018 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2019 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2020 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2021 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2022 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2023 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2024 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2025 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2026 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2027 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2028 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2029 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2030 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2031 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2032 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2033 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2034 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2035 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2036 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2037 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2038 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2039 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2040 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2041 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2042 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2043 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2044 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2045 .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);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2046 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2047 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2048 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2049 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2050 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2051 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2052 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2053 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2054 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2055 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2056 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2057 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2058 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2059 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2060 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2061 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2062 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2063 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2064 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2065 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2066 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2067 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2068 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2069 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2070 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2071 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2072 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2073 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2074 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2075 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2076 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2077 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2078 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2079 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2080 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2081 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2082 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2083 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2084 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2085 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2086 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2087 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2088 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2089 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2090 .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);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2091 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2092 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2093 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2094 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2095 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2096 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2097 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2098 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2099 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2100 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2101 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2102 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2103 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2104 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2105 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2106 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2107 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2108 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2109 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2110 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2111 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2112 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2113 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2114 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2115 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2116 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2117 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2118 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2119 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2120 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2121 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2122 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2123 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2124 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2125 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2126 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2127 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2128 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2129 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2130 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2131 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2132 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2133 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2134 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2135 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2136 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2137 .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);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2138 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2139 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2140 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2141 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2142 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2143 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2144 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2145 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2146 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2147 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2148 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2149 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2150 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2151 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2152 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2153 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2154 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2155 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2156 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2157 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2158 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2159 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2160 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2161 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2162 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2163 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2164 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2165 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2166 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2167 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2168 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2169 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2170 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2171 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2172 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2173 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2174 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2175 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2176 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2177 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2178 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2179 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2180 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2181 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2182 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2183 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2184 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2185 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2186 .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);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2187 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2188 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2189 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2190 <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})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2191 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2192 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2193 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2194 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2195 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2196 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2197 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2198 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2199 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2200 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2201 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2202 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2203 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2204 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2205 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2206 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2207 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2208 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2209 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2210 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2211 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2212 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2213 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2214 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2215 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2216 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2217 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2218 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2219 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2220 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2221 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2222 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2223 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2224 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2225 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2226 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2227 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2228 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2229 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2230 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2231 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2232 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2233 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2234 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2235 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2236 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2237 .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);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2238 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2239 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2240 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2241 <member name="T:Moq.Language.ISetupSequentialResult`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2242 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2243 Language for ReturnSequence
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2244 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2245 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2246 <member name="M:Moq.Language.ISetupSequentialResult`1.Returns(`0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2247 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2248 Returns value
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2249 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2250 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2251 <member name="M:Moq.Language.ISetupSequentialResult`1.Throws(System.Exception)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2252 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2253 Throws an exception
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2254 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2255 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2256 <member name="M:Moq.Language.ISetupSequentialResult`1.Throws``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2257 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2258 Throws an exception
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2259 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2260 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2261 <member name="M:Moq.Language.ISetupSequentialResult`1.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2262 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2263 Calls original method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2264 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2265 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2266 <member name="F:Moq.Linq.FluentMockVisitor.isFirst">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2267 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2268 The first method call or member access will be the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2269 last segment of the expression (depth-first traversal),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2270 which is the one we have to Setup rather than FluentMock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2271 And the last one is the one we have to Mock.Get rather
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2272 than FluentMock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2273 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2274 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2275 <member name="T:Moq.Mock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2276 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2277 Base class for mocks and static helper class with methods that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2278 apply to mocked objects, such as <see cref="M:Moq.Mock.Get``1(``0)"/> to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2279 retrieve a <see cref="T:Moq.Mock`1"/> from an object instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2280 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2281 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2282 <member name="M:Moq.Mock.Of``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2283 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2284 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2285 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2286 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2287 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2288 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2289 <member name="M:Moq.Mock.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2290 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2291 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2292 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2293 <param name="predicate">The predicate with the specification of how the mocked object should behave.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2294 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2295 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2296 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2297 <member name="M:Moq.Mock.#ctor">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2298 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2299 Initializes a new instance of the <see cref="T:Moq.Mock"/> class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2300 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2301 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2302 <member name="M:Moq.Mock.Get``1(``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2303 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2304 Retrieves the mock object for the given object instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2305 </summary><typeparam name="T">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2306 Type of the mock to retrieve. Can be omitted as it's inferred
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2307 from the object instance passed in as the <paramref name="mocked"/> instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2308 </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">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2309 The received <paramref name="mocked"/> instance
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2310 was not created by Moq.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2311 </exception><example group="advanced">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2312 The following example shows how to add a new setup to an object
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2313 instance which is not the original <see cref="T:Moq.Mock`1"/> but rather
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2314 the object associated with it:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2315 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2316 // Typed instance, not the mock, is retrieved from some test API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2317 HttpContextBase context = GetMockContext();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2318
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2319 // context.Request is the typed object from the "real" API
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2320 // so in order to add a setup to it, we need to get
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2321 // the mock that "owns" it
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2322 Mock&lt;HttpRequestBase&gt; request = Mock.Get(context.Request);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2323 mock.Setup(req =&gt; req.AppRelativeCurrentExecutionFilePath)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2324 .Returns(tempUrl);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2325 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2326 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2327 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2328 <member name="M:Moq.Mock.OnGetObject">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2329 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2330 Returns the mocked object value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2331 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2332 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2333 <member name="M:Moq.Mock.Verify">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2334 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2335 Verifies that all verifiable expectations have been met.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2336 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2337 This example sets up an expectation and marks it as verifiable. After
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2338 the mock is used, a <c>Verify()</c> call is issued on the mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2339 to ensure the method in the setup was invoked:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2340 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2341 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2342 this.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Verifiable().Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2343 ...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2344 // other test code
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2345 ...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2346 // Will throw if the test code has didn't call HasInventory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2347 this.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2348 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2349 </example><exception cref="T:Moq.MockException">Not all verifiable expectations were met.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2350 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2351 <member name="M:Moq.Mock.VerifyAll">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2352 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2353 Verifies all expectations regardless of whether they have
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2354 been flagged as verifiable.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2355 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2356 This example sets up an expectation without marking it as verifiable. After
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2357 the mock is used, a <see cref="M:Moq.Mock.VerifyAll"/> call is issued on the mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2358 to ensure that all expectations are met:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2359 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2360 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2361 this.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2362 ...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2363 // other test code
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2364 ...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2365 // Will throw if the test code has didn't call HasInventory, even
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2366 // that expectation was not marked as verifiable.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2367 this.VerifyAll();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2368 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2369 </example><exception cref="T:Moq.MockException">At least one expectation was not met.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2370 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2371 <member name="M:Moq.Mock.GetInterceptor(System.Linq.Expressions.Expression,Moq.Mock)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2372 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2373 Gets the interceptor target for the given expression and root mock,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2374 building the intermediate hierarchy of mock objects if necessary.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2375 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2376 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2377 <member name="M:Moq.Mock.DoRaise(System.Reflection.EventInfo,System.EventArgs)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2378 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2379 Raises the associated event with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2380 event argument data.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2381 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2382 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2383 <member name="M:Moq.Mock.DoRaise(System.Reflection.EventInfo,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2384 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2385 Raises the associated event with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2386 event argument data.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2387 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2388 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2389 <member name="M:Moq.Mock.As``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2390 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2391 Adds an interface implementation to the mock,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2392 allowing setups to be specified for it.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2393 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2394 This method can only be called before the first use
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2395 of the mock <see cref="P:Moq.Mock.Object"/> property, at which
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2396 point the runtime type has already been generated
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2397 and no more interfaces can be added to it.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2398 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2399 Also, <typeparamref name="TInterface"/> must be an
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2400 interface and not a class, which must be specified
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2401 when creating the mock instead.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2402 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2403 </remarks><exception cref="T:System.InvalidOperationException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2404 The mock type
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2405 has already been generated by accessing the <see cref="P:Moq.Mock.Object"/> property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2406 </exception><exception cref="T:System.ArgumentException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2407 The <typeparamref name="TInterface"/> specified
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2408 is not an interface.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2409 </exception><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2410 The following example creates a mock for the main interface
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2411 and later adds <see cref="T:System.IDisposable"/> to it to verify
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2412 it's called by the consumer code:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2413 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2414 var mock = new Mock&lt;IProcessor&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2415 mock.Setup(x =&gt; x.Execute("ping"));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2416
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2417 // add IDisposable interface
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2418 var disposable = mock.As&lt;IDisposable&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2419 disposable.Setup(d =&gt; d.Dispose()).Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2420 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2421 </example><typeparam name="TInterface">Type of interface to cast the mock to.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2422 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2423 <member name="M:Moq.Mock.SetReturnsDefault``1(``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2424 <!-- No matching elements were found for the following include tag --><include file="Mock.Generic.xdoc" path="docs/doc[@for=&quot;Mock.SetReturnDefault{TReturn}&quot;]/*"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2425 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2426 <member name="P:Moq.Mock.Behavior">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2427 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2428 Behavior of the mock, according to the value set in the constructor.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2429 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2430 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2431 <member name="P:Moq.Mock.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2432 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2433 Whether the base member virtual implementation will be called
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2434 for mocked classes if no setup is matched. Defaults to <see langword="false"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2435 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2436 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2437 <member name="P:Moq.Mock.DefaultValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2438 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2439 Specifies the behavior to use when returning default values for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2440 unexpected invocations on loose mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2441 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2442 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2443 <member name="P:Moq.Mock.Object">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2444 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2445 Gets the mocked object instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2446 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2447 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2448 <member name="P:Moq.Mock.MockedType">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2449 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2450 Retrieves the type of the mocked object, its generic type argument.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2451 This is used in the auto-mocking of hierarchy access.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2452 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2453 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2454 <member name="P:Moq.Mock.DelegateInterfaceMethod">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2455 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2456 If this is a mock of a delegate, this property contains the method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2457 on the autogenerated interface so that we can convert setup + verify
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2458 expressions on the delegate into expressions on the interface proxy.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2459 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2460 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2461 <member name="P:Moq.Mock.IsDelegateMock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2462 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2463 Allows to check whether expression conversion to the <see cref="P:Moq.Mock.DelegateInterfaceMethod"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2464 must be performed on the mock, without causing unnecessarily early initialization of
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2465 the mock instance, which breaks As{T}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2466 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2467 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2468 <member name="P:Moq.Mock.DefaultValueProvider">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2469 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2470 Specifies the class that will determine the default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2471 value to return when invocations are made that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2472 have no setups and need to return a default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2473 value (for loose mocks).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2474 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2475 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2476 <member name="P:Moq.Mock.ImplementedInterfaces">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2477 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2478 Exposes the list of extra interfaces implemented by the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2479 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2480 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2481 <member name="T:Moq.MockRepository">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2482 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2483 Utility repository class to use to construct multiple
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2484 mocks when consistent verification is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2485 desired for all of them.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2486 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2487 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2488 If multiple mocks will be created during a test, passing
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2489 the desired <see cref="T:Moq.MockBehavior"/> (if different than the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2490 <see cref="F:Moq.MockBehavior.Default"/> or the one
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2491 passed to the repository constructor) and later verifying each
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2492 mock can become repetitive and tedious.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2493 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2494 This repository class helps in that scenario by providing a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2495 simplified creation of multiple mocks with a default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2496 <see cref="T:Moq.MockBehavior"/> (unless overriden by calling
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2497 <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/>) and posterior verification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2498 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2499 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2500 <example group="repository">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2501 The following is a straightforward example on how to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2502 create and automatically verify strict mocks using a <see cref="T:Moq.MockRepository"/>:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2503 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2504 var repository = new MockRepository(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2505
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2506 var foo = repository.Create&lt;IFoo&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2507 var bar = repository.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2508
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2509 // no need to call Verifiable() on the setup
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2510 // as we'll be validating all of them anyway.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2511 foo.Setup(f =&gt; f.Do());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2512 bar.Setup(b =&gt; b.Redo());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2513
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2514 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2515
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2516 repository.VerifyAll();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2517 // At this point all setups are already checked
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2518 // and an optional MockException might be thrown.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2519 // Note also that because the mocks are strict, any invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2520 // that doesn't have a matching setup will also throw a MockException.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2521 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2522 The following examples shows how to setup the repository
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2523 to create loose mocks and later verify only verifiable setups:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2524 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2525 var repository = new MockRepository(MockBehavior.Loose);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2526
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2527 var foo = repository.Create&lt;IFoo&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2528 var bar = repository.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2529
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2530 // this setup will be verified when we verify the repository
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2531 foo.Setup(f =&gt; f.Do()).Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2532
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2533 // this setup will NOT be verified
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2534 foo.Setup(f =&gt; f.Calculate());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2535
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2536 // this setup will be verified when we verify the repository
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2537 bar.Setup(b =&gt; b.Redo()).Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2538
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2539 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2540 // note that because the mocks are Loose, members
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2541 // called in the interfaces for which no matching
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2542 // setups exist will NOT throw exceptions,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2543 // and will rather return default values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2544
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2545 repository.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2546 // At this point verifiable setups are already checked
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2547 // and an optional MockException might be thrown.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2548 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2549 The following examples shows how to setup the repository with a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2550 default strict behavior, overriding that default for a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2551 specific mock:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2552 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2553 var repository = new MockRepository(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2554
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2555 // this particular one we want loose
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2556 var foo = repository.Create&lt;IFoo&gt;(MockBehavior.Loose);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2557 var bar = repository.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2558
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2559 // specify setups
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2560
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2561 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2562
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2563 repository.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2564 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2565 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2566 <seealso cref="T:Moq.MockBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2567 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2568 <member name="T:Moq.MockFactory">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2569 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2570 Utility factory class to use to construct multiple
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2571 mocks when consistent verification is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2572 desired for all of them.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2573 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2574 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2575 If multiple mocks will be created during a test, passing
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2576 the desired <see cref="T:Moq.MockBehavior"/> (if different than the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2577 <see cref="F:Moq.MockBehavior.Default"/> or the one
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2578 passed to the factory constructor) and later verifying each
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2579 mock can become repetitive and tedious.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2580 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2581 This factory class helps in that scenario by providing a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2582 simplified creation of multiple mocks with a default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2583 <see cref="T:Moq.MockBehavior"/> (unless overriden by calling
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2584 <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/>) and posterior verification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2585 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2586 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2587 <example group="factory">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2588 The following is a straightforward example on how to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2589 create and automatically verify strict mocks using a <see cref="T:Moq.MockFactory"/>:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2590 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2591 var factory = new MockFactory(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2592
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2593 var foo = factory.Create&lt;IFoo&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2594 var bar = factory.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2595
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2596 // no need to call Verifiable() on the setup
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2597 // as we'll be validating all of them anyway.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2598 foo.Setup(f =&gt; f.Do());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2599 bar.Setup(b =&gt; b.Redo());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2600
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2601 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2602
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2603 factory.VerifyAll();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2604 // At this point all setups are already checked
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2605 // and an optional MockException might be thrown.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2606 // Note also that because the mocks are strict, any invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2607 // that doesn't have a matching setup will also throw a MockException.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2608 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2609 The following examples shows how to setup the factory
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2610 to create loose mocks and later verify only verifiable setups:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2611 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2612 var factory = new MockFactory(MockBehavior.Loose);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2613
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2614 var foo = factory.Create&lt;IFoo&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2615 var bar = factory.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2616
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2617 // this setup will be verified when we verify the factory
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2618 foo.Setup(f =&gt; f.Do()).Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2619
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2620 // this setup will NOT be verified
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2621 foo.Setup(f =&gt; f.Calculate());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2622
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2623 // this setup will be verified when we verify the factory
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2624 bar.Setup(b =&gt; b.Redo()).Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2625
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2626 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2627 // note that because the mocks are Loose, members
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2628 // called in the interfaces for which no matching
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2629 // setups exist will NOT throw exceptions,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2630 // and will rather return default values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2631
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2632 factory.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2633 // At this point verifiable setups are already checked
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2634 // and an optional MockException might be thrown.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2635 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2636 The following examples shows how to setup the factory with a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2637 default strict behavior, overriding that default for a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2638 specific mock:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2639 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2640 var factory = new MockFactory(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2641
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2642 // this particular one we want loose
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2643 var foo = factory.Create&lt;IFoo&gt;(MockBehavior.Loose);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2644 var bar = factory.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2645
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2646 // specify setups
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2647
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2648 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2649
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2650 factory.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2651 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2652 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2653 <seealso cref="T:Moq.MockBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2654 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2655 <member name="M:Moq.MockFactory.#ctor(Moq.MockBehavior)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2656 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2657 Initializes the factory with the given <paramref name="defaultBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2658 for newly created mocks from the factory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2659 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2660 <param name="defaultBehavior">The behavior to use for mocks created
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2661 using the <see cref="M:Moq.MockFactory.Create``1"/> factory method if not overriden
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2662 by using the <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/> overload.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2663 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2664 <member name="M:Moq.MockFactory.Create``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2665 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2666 Creates a new mock with the default <see cref="T:Moq.MockBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2667 specified at factory construction time.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2668 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2669 <typeparam name="T">Type to mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2670 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2671 <example ignore="true">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2672 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2673 var factory = new MockFactory(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2674
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2675 var foo = factory.Create&lt;IFoo&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2676 // use mock on tests
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2677
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2678 factory.VerifyAll();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2679 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2680 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2681 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2682 <member name="M:Moq.MockFactory.Create``1(System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2683 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2684 Creates a new mock with the default <see cref="T:Moq.MockBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2685 specified at factory construction time and with the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2686 the given constructor arguments for the class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2687 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2688 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2689 The mock will try to find the best match constructor given the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2690 constructor arguments, and invoke that to initialize the instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2691 This applies only to classes, not interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2692 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2693 <typeparam name="T">Type to mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2694 <param name="args">Constructor arguments for mocked classes.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2695 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2696 <example ignore="true">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2697 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2698 var factory = new MockFactory(MockBehavior.Default);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2699
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2700 var mock = factory.Create&lt;MyBase&gt;("Foo", 25, true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2701 // use mock on tests
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2702
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2703 factory.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2704 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2705 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2706 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2707 <member name="M:Moq.MockFactory.Create``1(Moq.MockBehavior)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2708 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2709 Creates a new mock with the given <paramref name="behavior"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2710 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2711 <typeparam name="T">Type to mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2712 <param name="behavior">Behavior to use for the mock, which overrides
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2713 the default behavior specified at factory construction time.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2714 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2715 <example group="factory">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2716 The following example shows how to create a mock with a different
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2717 behavior to that specified as the default for the factory:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2718 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2719 var factory = new MockFactory(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2720
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2721 var foo = factory.Create&lt;IFoo&gt;(MockBehavior.Loose);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2722 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2723 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2724 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2725 <member name="M:Moq.MockFactory.Create``1(Moq.MockBehavior,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2726 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2727 Creates a new mock with the given <paramref name="behavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2728 and with the the given constructor arguments for the class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2729 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2730 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2731 The mock will try to find the best match constructor given the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2732 constructor arguments, and invoke that to initialize the instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2733 This applies only to classes, not interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2734 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2735 <typeparam name="T">Type to mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2736 <param name="behavior">Behavior to use for the mock, which overrides
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2737 the default behavior specified at factory construction time.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2738 <param name="args">Constructor arguments for mocked classes.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2739 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2740 <example group="factory">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2741 The following example shows how to create a mock with a different
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2742 behavior to that specified as the default for the factory, passing
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2743 constructor arguments:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2744 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2745 var factory = new MockFactory(MockBehavior.Default);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2746
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2747 var mock = factory.Create&lt;MyBase&gt;(MockBehavior.Strict, "Foo", 25, true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2748 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2749 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2750 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2751 <member name="M:Moq.MockFactory.CreateMock``1(Moq.MockBehavior,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2752 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2753 Implements creation of a new mock within the factory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2754 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2755 <typeparam name="T">Type to mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2756 <param name="behavior">The behavior for the new mock.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2757 <param name="args">Optional arguments for the construction of the mock.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2758 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2759 <member name="M:Moq.MockFactory.Verify">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2760 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2761 Verifies all verifiable expectations on all mocks created
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2762 by this factory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2763 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2764 <seealso cref="M:Moq.Mock.Verify"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2765 <exception cref="T:Moq.MockException">One or more mocks had expectations that were not satisfied.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2766 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2767 <member name="M:Moq.MockFactory.VerifyAll">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2768 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2769 Verifies all verifiable expectations on all mocks created
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2770 by this factory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2771 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2772 <seealso cref="M:Moq.Mock.Verify"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2773 <exception cref="T:Moq.MockException">One or more mocks had expectations that were not satisfied.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2774 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2775 <member name="M:Moq.MockFactory.VerifyMocks(System.Action{Moq.Mock})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2776 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2777 Invokes <paramref name="verifyAction"/> for each mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2778 in <see cref="P:Moq.MockFactory.Mocks"/>, and accumulates the resulting
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2779 <see cref="T:Moq.MockVerificationException"/> that might be
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2780 thrown from the action.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2781 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2782 <param name="verifyAction">The action to execute against
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2783 each mock.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2784 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2785 <member name="P:Moq.MockFactory.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2786 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2787 Whether the base member virtual implementation will be called
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2788 for mocked classes if no setup is matched. Defaults to <see langword="false"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2789 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2790 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2791 <member name="P:Moq.MockFactory.DefaultValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2792 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2793 Specifies the behavior to use when returning default values for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2794 unexpected invocations on loose mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2795 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2796 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2797 <member name="P:Moq.MockFactory.Mocks">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2798 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2799 Gets the mocks that have been created by this factory and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2800 that will get verified together.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2801 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2802 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2803 <member name="M:Moq.MockRepository.Of``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2804 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2805 Access the universe of mocks of the given type, to retrieve those
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2806 that behave according to the LINQ query specification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2807 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2808 <typeparam name="T">The type of the mocked object to query.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2809 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2810 <member name="M:Moq.MockRepository.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2811 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2812 Access the universe of mocks of the given type, to retrieve those
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2813 that behave according to the LINQ query specification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2814 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2815 <param name="specification">The predicate with the setup expressions.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2816 <typeparam name="T">The type of the mocked object to query.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2817 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2818 <member name="M:Moq.MockRepository.OneOf``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2819 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2820 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2821 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2822 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2823 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2824 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2825 <member name="M:Moq.MockRepository.OneOf``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2826 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2827 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2828 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2829 <param name="specification">The predicate with the setup expressions.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2830 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2831 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2832 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2833 <member name="M:Moq.MockRepository.CreateMockQuery``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2834 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2835 Creates the mock query with the underlying queriable implementation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2836 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2837 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2838 <member name="M:Moq.MockRepository.CreateQueryable``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2839 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2840 Wraps the enumerator inside a queryable.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2841 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2842 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2843 <member name="M:Moq.MockRepository.CreateMocks``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2844 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2845 Method that is turned into the actual call from .Query{T}, to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2846 transform the queryable query into a normal enumerable query.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2847 This method is never used directly by consumers.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2848 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2849 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2850 <member name="M:Moq.MockRepository.#ctor(Moq.MockBehavior)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2851 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2852 Initializes the repository with the given <paramref name="defaultBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2853 for newly created mocks from the repository.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2854 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2855 <param name="defaultBehavior">The behavior to use for mocks created
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2856 using the <see cref="M:Moq.MockFactory.Create``1"/> repository method if not overriden
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2857 by using the <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/> overload.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2858 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2859 <member name="T:Moq.EmptyDefaultValueProvider">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2860 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2861 A <see cref="T:Moq.IDefaultValueProvider"/> that returns an empty default value
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2862 for invocations that do not have setups or return values, with loose mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2863 This is the default behavior for a mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2864 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2865 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2866 <member name="T:Moq.IDefaultValueProvider">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2867 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2868 Interface to be implemented by classes that determine the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2869 default value of non-expected invocations.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2870 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2871 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2872 <member name="M:Moq.IDefaultValueProvider.DefineDefault``1(``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2873 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2874 Defines the default value to return in all the methods returning <typeparamref name="T"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2875 </summary><typeparam name="T">The type of the return value.</typeparam><param name="value">The value to set as default.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2876 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2877 <member name="M:Moq.IDefaultValueProvider.ProvideDefault(System.Reflection.MethodInfo)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2878 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2879 Provides a value for the given member and arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2880 </summary><param name="member">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2881 The member to provide a default value for.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2882 </param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2883 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2884 <member name="T:Moq.ExpressionStringBuilder">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2885 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2886 The intention of <see cref="T:Moq.ExpressionStringBuilder"/> is to create a more readable
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2887 string representation for the failure message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2888 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2889 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2890 <member name="T:Moq.Language.Flow.ICallbackResult">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2891 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2892 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2893 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2894 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2895 <member name="T:Moq.Language.IThrows">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2896 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2897 Defines the <c>Throws</c> verb.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2898 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2899 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2900 <member name="M:Moq.Language.IThrows.Throws(System.Exception)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2901 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2902 Specifies the exception to throw when the method is invoked.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2903 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2904 <param name="exception">Exception instance to throw.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2905 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2906 This example shows how to throw an exception when the method is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2907 invoked with an empty string argument:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2908 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2909 mock.Setup(x =&gt; x.Execute(""))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2910 .Throws(new ArgumentException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2911 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2912 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2913 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2914 <member name="M:Moq.Language.IThrows.Throws``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2915 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2916 Specifies the type of exception to throw when the method is invoked.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2917 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2918 <typeparam name="TException">Type of exception to instantiate and throw when the setup is matched.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2919 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2920 This example shows how to throw an exception when the method is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2921 invoked with an empty string argument:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2922 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2923 mock.Setup(x =&gt; x.Execute(""))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2924 .Throws&lt;ArgumentException&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2925 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2926 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2927 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2928 <member name="T:Moq.Language.Flow.IThrowsResult">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2929 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2930 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2931 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2932 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2933 <member name="T:Moq.Language.IOccurrence">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2934 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2935 Defines occurrence members to constraint setups.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2936 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2937 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2938 <member name="M:Moq.Language.IOccurrence.AtMostOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2939 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2940 The expected invocation can happen at most once.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2941 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2942 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2943 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2944 var mock = new Mock&lt;ICommand&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2945 mock.Setup(foo => foo.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2946 .AtMostOnce();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2947 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2948 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2949 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2950 <member name="M:Moq.Language.IOccurrence.AtMost(System.Int32)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2951 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2952 The expected invocation can happen at most specified number of times.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2953 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2954 <param name="callCount">The number of times to accept calls.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2955 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2956 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2957 var mock = new Mock&lt;ICommand&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2958 mock.Setup(foo => foo.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2959 .AtMost( 5 );
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2960 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2961 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2962 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2963 <member name="T:Moq.Language.IVerifies">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2964 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2965 Defines the <c>Verifiable</c> verb.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2966 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2967 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2968 <member name="M:Moq.Language.IVerifies.Verifiable">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2969 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2970 Marks the expectation as verifiable, meaning that a call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2971 to <see cref="M:Moq.Mock.Verify"/> will check if this particular
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2972 expectation was met.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2973 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2974 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2975 The following example marks the expectation as verifiable:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2976 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2977 mock.Expect(x =&gt; x.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2978 .Returns(true)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2979 .Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2980 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2981 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2982 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2983 <member name="M:Moq.Language.IVerifies.Verifiable(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2984 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2985 Marks the expectation as verifiable, meaning that a call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2986 to <see cref="M:Moq.Mock.Verify"/> will check if this particular
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2987 expectation was met, and specifies a message for failures.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2988 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2989 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2990 The following example marks the expectation as verifiable:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2991 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2992 mock.Expect(x =&gt; x.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2993 .Returns(true)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2994 .Verifiable("Ping should be executed always!");
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2995 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2996 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2997 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2998 <member name="T:Moq.Language.Flow.ISetup`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2999 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3000 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3001 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3002 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3003 <member name="T:Moq.MethodCallReturn">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3004 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3005 We need this non-generics base class so that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3006 we can use <see cref="P:Moq.MethodCallReturn.HasReturnValue"/> from
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3007 generic code.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3008 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3009 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3010 <member name="T:Moq.Language.Flow.ISetup`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3011 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3012 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3013 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3014 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3015 <member name="T:Moq.Language.Flow.IReturnsThrows`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3016 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3017 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3018 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3019 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3020 <member name="T:Moq.Language.Flow.ISetupGetter`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3021 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3022 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3023 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3024 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3025 <member name="T:Moq.Language.ICallbackGetter`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3026 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3027 Defines the <c>Callback</c> verb for property getter setups.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3028 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3029 <seealso cref="M:Moq.Mock`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3030 <typeparam name="TMock">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3031 <typeparam name="TProperty">Type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3032 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3033 <member name="M:Moq.Language.ICallbackGetter`2.Callback(System.Action)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3034 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3035 Specifies a callback to invoke when the property is retrieved.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3036 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3037 <param name="action">Callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3038 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3039 Invokes the given callback with the property value being set.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3040 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3041 mock.SetupGet(x => x.Suspended)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3042 .Callback(() => called = true)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3043 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3044 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3045 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3046 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3047 <member name="T:Moq.Language.Flow.IReturnsThrowsGetter`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3048 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3049 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3050 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3051 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3052 <member name="T:Moq.Language.IReturnsGetter`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3053 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3054 Defines the <c>Returns</c> verb for property get setups.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3055 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3056 <typeparam name="TMock">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3057 <typeparam name="TProperty">Type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3058 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3059 <member name="M:Moq.Language.IReturnsGetter`2.Returns(`1)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3060 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3061 Specifies the value to return.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3062 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3063 <param name="value">The value to return, or <see langword="null"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3064 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3065 Return a <c>true</c> value from the property getter call:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3066 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3067 mock.SetupGet(x => x.Suspended)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3068 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3069 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3070 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3071 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3072 <member name="M:Moq.Language.IReturnsGetter`2.Returns(System.Func{`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3073 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3074 Specifies a function that will calculate the value to return for the property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3075 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3076 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3077 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3078 Return a calculated value when the property is retrieved:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3079 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3080 mock.SetupGet(x => x.Suspended)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3081 .Returns(() => returnValues[0]);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3082 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3083 The lambda expression to retrieve the return value is lazy-executed,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3084 meaning that its value may change depending on the moment the property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3085 is retrieved and the value the <c>returnValues</c> array has at
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3086 that moment.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3087 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3088 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3089 <member name="M:Moq.Language.IReturnsGetter`2.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3090 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3091 Calls the real property of the object and returns its return value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3092 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3093 <returns>The value calculated by the real property of the object.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3094 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3095 <member name="T:Moq.Language.Flow.IReturnsResult`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3096 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3097 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3098 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3099 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3100 <member name="T:Moq.MockExtensions">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3101 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3102 Provides additional methods on mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3103 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3104 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3105 Those methods are useful for Testeroids support.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3106 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3107 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3108 <member name="M:Moq.MockExtensions.ResetCalls(Moq.Mock)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3109 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3110 Resets the calls previously made on the specified mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3111 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3112 <param name="mock">The mock whose calls need to be reset.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3113 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3114 <member name="T:Moq.MockSequence">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3115 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3116 Helper class to setup a full trace between many mocks
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3117 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3118 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3119 <member name="M:Moq.MockSequence.#ctor">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3120 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3121 Initialize a trace setup
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3122 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3123 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3124 <member name="P:Moq.MockSequence.Cyclic">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3125 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3126 Allow sequence to be repeated
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3127 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3128 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3129 <member name="T:Moq.MockSequenceHelper">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3130 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3131 define nice api
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3132 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3133 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3134 <member name="M:Moq.MockSequenceHelper.InSequence``1(Moq.Mock{``0},Moq.MockSequence)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3135 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3136 Perform an expectation in the trace.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3137 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3138 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3139 <member name="T:Moq.MatcherAttribute">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3140 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3141 Marks a method as a matcher, which allows complete replacement
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3142 of the built-in <see cref="T:Moq.It"/> class with your own argument
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3143 matching rules.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3144 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3145 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3146 <b>This feature has been deprecated in favor of the new
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3147 and simpler <see cref="T:Moq.Match`1"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3148 </b>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3149 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3150 The argument matching is used to determine whether a concrete
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3151 invocation in the mock matches a given setup. This
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3152 matching mechanism is fully extensible.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3153 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3154 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3155 There are two parts of a matcher: the compiler matcher
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3156 and the runtime matcher.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3157 <list type="bullet">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3158 <item>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3159 <term>Compiler matcher</term>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3160 <description>Used to satisfy the compiler requirements for the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3161 argument. Needs to be a method optionally receiving any arguments
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3162 you might need for the matching, but with a return type that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3163 matches that of the argument.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3164 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3165 Let's say I want to match a lists of orders that contains
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3166 a particular one. I might create a compiler matcher like the following:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3167 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3168 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3169 public static class Orders
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3170 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3171 [Matcher]
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3172 public static IEnumerable&lt;Order&gt; Contains(Order order)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3173 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3174 return null;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3175 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3176 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3177 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3178 Now we can invoke this static method instead of an argument in an
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3179 invocation:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3180 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3181 var order = new Order { ... };
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3182 var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3183
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3184 mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3185 .Throws&lt;ArgumentException&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3186 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3187 Note that the return value from the compiler matcher is irrelevant.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3188 This method will never be called, and is just used to satisfy the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3189 compiler and to signal Moq that this is not a method that we want
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3190 to be invoked at runtime.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3191 </description>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3192 </item>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3193 <item>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3194 <term>Runtime matcher</term>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3195 <description>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3196 The runtime matcher is the one that will actually perform evaluation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3197 when the test is run, and is defined by convention to have the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3198 same signature as the compiler matcher, but where the return
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3199 value is the first argument to the call, which contains the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3200 object received by the actual invocation at runtime:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3201 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3202 public static bool Contains(IEnumerable&lt;Order&gt; orders, Order order)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3203 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3204 return orders.Contains(order);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3205 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3206 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3207 At runtime, the mocked method will be invoked with a specific
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3208 list of orders. This value will be passed to this runtime
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3209 matcher as the first argument, while the second argument is the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3210 one specified in the setup (<c>x.Save(Orders.Contains(order))</c>).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3211 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3212 The boolean returned determines whether the given argument has been
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3213 matched. If all arguments to the expected method are matched, then
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3214 the setup matches and is evaluated.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3215 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3216 </description>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3217 </item>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3218 </list>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3219 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3220 Using this extensible infrastructure, you can easily replace the entire
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3221 <see cref="T:Moq.It"/> set of matchers with your own. You can also avoid the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3222 typical (and annoying) lengthy expressions that result when you have
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3223 multiple arguments that use generics.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3224 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3225 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3226 The following is the complete example explained above:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3227 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3228 public static class Orders
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3229 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3230 [Matcher]
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3231 public static IEnumerable&lt;Order&gt; Contains(Order order)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3232 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3233 return null;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3234 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3235
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3236 public static bool Contains(IEnumerable&lt;Order&gt; orders, Order order)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3237 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3238 return orders.Contains(order);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3239 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3240 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3241 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3242 And the concrete test using this matcher:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3243 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3244 var order = new Order { ... };
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3245 var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3246
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3247 mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3248 .Throws&lt;ArgumentException&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3249
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3250 // use mock, invoke Save, and have the matcher filter.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3251 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3252 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3253 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3254 <member name="T:Moq.Mock`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3255 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3256 Provides a mock implementation of <typeparamref name="T"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3257 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3258 Any interface type can be used for mocking, but for classes, only abstract and virtual members can be mocked.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3259 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3260 The behavior of the mock with regards to the setups and the actual calls is determined
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3261 by the optional <see cref="T:Moq.MockBehavior"/> that can be passed to the <see cref="M:Moq.Mock`1.#ctor(Moq.MockBehavior)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3262 constructor.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3263 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3264 </remarks><typeparam name="T">Type to mock, which can be an interface or a class.</typeparam><example group="overview" order="0">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3265 The following example shows establishing setups with specific values
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3266 for method invocations:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3267 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3268 // Arrange
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3269 var order = new Order(TALISKER, 50);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3270 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3271
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3272 mock.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3273
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3274 // Act
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3275 order.Fill(mock.Object);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3276
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3277 // Assert
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3278 Assert.True(order.IsFilled);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3279 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3280 The following example shows how to use the <see cref="T:Moq.It"/> class
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3281 to specify conditions for arguments instead of specific values:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3282 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3283 // Arrange
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3284 var order = new Order(TALISKER, 50);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3285 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3286
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3287 // shows how to expect a value within a range
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3288 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3289 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3290 It.IsInRange(0, 100, Range.Inclusive)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3291 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3292
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3293 // shows how to throw for unexpected calls.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3294 mock.Setup(x =&gt; x.Remove(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3295 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3296 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3297 .Throws(new InvalidOperationException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3298
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3299 // Act
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3300 order.Fill(mock.Object);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3301
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3302 // Assert
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3303 Assert.False(order.IsFilled);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3304 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3305 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3306 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3307 <member name="M:Moq.Mock`1.Expect(System.Linq.Expressions.Expression{System.Action{`0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3308 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3309 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3310 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3311 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3312 <member name="M:Moq.Mock`1.Expect``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3313 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3314 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3315 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3316 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3317 <member name="M:Moq.Mock`1.ExpectGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3318 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3319 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3320 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3321 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3322 <member name="M:Moq.Mock`1.ExpectSet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3323 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3324 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3325 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3326 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3327 <member name="M:Moq.Mock`1.ExpectSet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3328 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3329 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3330 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3331 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3332 <member name="M:Moq.Mock`1.#ctor(System.Boolean)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3333 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3334 Ctor invoked by AsTInterface exclusively.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3335 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3336 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3337 <member name="M:Moq.Mock`1.#ctor">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3338 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3339 Initializes an instance of the mock with <see cref="F:Moq.MockBehavior.Default">default behavior</see>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3340 </summary><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3341 <code>var mock = new Mock&lt;IFormatProvider&gt;();</code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3342 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3343 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3344 <member name="M:Moq.Mock`1.#ctor(System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3345 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3346 Initializes an instance of the mock with <see cref="F:Moq.MockBehavior.Default">default behavior</see> and with
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3347 the given constructor arguments for the class. (Only valid when <typeparamref name="T"/> is a class)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3348 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3349 The mock will try to find the best match constructor given the constructor arguments, and invoke that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3350 to initialize the instance. This applies only for classes, not interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3351 </remarks><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3352 <code>var mock = new Mock&lt;MyProvider&gt;(someArgument, 25);</code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3353 </example><param name="args">Optional constructor arguments if the mocked type is a class.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3354 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3355 <member name="M:Moq.Mock`1.#ctor(Moq.MockBehavior)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3356 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3357 Initializes an instance of the mock with the specified <see cref="T:Moq.MockBehavior">behavior</see>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3358 </summary><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3359 <code>var mock = new Mock&lt;IFormatProvider&gt;(MockBehavior.Relaxed);</code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3360 </example><param name="behavior">Behavior of the mock.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3361 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3362 <member name="M:Moq.Mock`1.#ctor(Moq.MockBehavior,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3363 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3364 Initializes an instance of the mock with a specific <see cref="T:Moq.MockBehavior">behavior</see> with
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3365 the given constructor arguments for the class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3366 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3367 The mock will try to find the best match constructor given the constructor arguments, and invoke that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3368 to initialize the instance. This applies only to classes, not interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3369 </remarks><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3370 <code>var mock = new Mock&lt;MyProvider&gt;(someArgument, 25);</code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3371 </example><param name="behavior">Behavior of the mock.</param><param name="args">Optional constructor arguments if the mocked type is a class.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3372 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3373 <member name="M:Moq.Mock`1.OnGetObject">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3374 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3375 Returns the mocked object value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3376 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3377 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3378 <member name="M:Moq.Mock`1.Setup(System.Linq.Expressions.Expression{System.Action{`0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3379 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3380 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3381 to a void method.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3382 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3383 If more than one setup is specified for the same method or property,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3384 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3385 </remarks><param name="expression">Lambda expression that specifies the expected method invocation.</param><example group="setups">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3386 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3387 var mock = new Mock&lt;IProcessor&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3388 mock.Setup(x =&gt; x.Execute("ping"));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3389 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3390 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3391 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3392 <member name="M:Moq.Mock`1.Setup``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3393 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3394 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3395 to a value returning method.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3396 </summary><typeparam name="TResult">Type of the return value. Typically omitted as it can be inferred from the expression.</typeparam><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3397 If more than one setup is specified for the same method or property,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3398 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3399 </remarks><param name="expression">Lambda expression that specifies the method invocation.</param><example group="setups">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3400 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3401 mock.Setup(x =&gt; x.HasInventory("Talisker", 50)).Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3402 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3403 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3404 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3405 <member name="M:Moq.Mock`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3406 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3407 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3408 to a property getter.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3409 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3410 If more than one setup is set for the same property getter,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3411 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3412 </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">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3413 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3414 mock.SetupGet(x =&gt; x.Suspended)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3415 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3416 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3417 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3418 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3419 <member name="M:Moq.Mock`1.SetupSet``1(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3420 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3421 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3422 to a property setter.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3423 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3424 If more than one setup is set for the same property setter,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3425 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3426 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3427 This overloads allows the use of a callback already
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3428 typed for the property type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3429 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3430 </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">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3431 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3432 mock.SetupSet(x =&gt; x.Suspended = true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3433 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3434 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3435 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3436 <member name="M:Moq.Mock`1.SetupSet(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3437 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3438 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3439 to a property setter.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3440 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3441 If more than one setup is set for the same property setter,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3442 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3443 </remarks><param name="setterExpression">Lambda expression that sets a property to a value.</param><example group="setups">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3444 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3445 mock.SetupSet(x =&gt; x.Suspended = true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3446 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3447 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3448 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3449 <member name="M:Moq.Mock`1.SetupProperty``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3450 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3451 Specifies that the given property should have "property behavior",
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3452 meaning that setting its value will cause it to be saved and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3453 later returned when the property is requested. (this is also
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3454 known as "stubbing").
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3455 </summary><typeparam name="TProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3456 Type of the property, inferred from the property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3457 expression (does not need to be specified).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3458 </typeparam><param name="property">Property expression to stub.</param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3459 If you have an interface with an int property <c>Value</c>, you might
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3460 stub it using the following straightforward call:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3461 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3462 var mock = new Mock&lt;IHaveValue&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3463 mock.Stub(v =&gt; v.Value);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3464 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3465 After the <c>Stub</c> call has been issued, setting and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3466 retrieving the object value will behave as expected:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3467 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3468 IHaveValue v = mock.Object;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3469
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3470 v.Value = 5;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3471 Assert.Equal(5, v.Value);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3472 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3473 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3474 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3475 <member name="M:Moq.Mock`1.SetupProperty``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3476 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3477 Specifies that the given property should have "property behavior",
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3478 meaning that setting its value will cause it to be saved and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3479 later returned when the property is requested. This overload
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3480 allows setting the initial value for the property. (this is also
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3481 known as "stubbing").
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3482 </summary><typeparam name="TProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3483 Type of the property, inferred from the property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3484 expression (does not need to be specified).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3485 </typeparam><param name="property">Property expression to stub.</param><param name="initialValue">Initial value for the property.</param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3486 If you have an interface with an int property <c>Value</c>, you might
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3487 stub it using the following straightforward call:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3488 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3489 var mock = new Mock&lt;IHaveValue&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3490 mock.SetupProperty(v =&gt; v.Value, 5);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3491 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3492 After the <c>SetupProperty</c> call has been issued, setting and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3493 retrieving the object value will behave as expected:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3494 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3495 IHaveValue v = mock.Object;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3496 // Initial value was stored
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3497 Assert.Equal(5, v.Value);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3498
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3499 // New value set which changes the initial value
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3500 v.Value = 6;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3501 Assert.Equal(6, v.Value);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3502 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3503 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3504 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3505 <member name="M:Moq.Mock`1.SetupAllProperties">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3506 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3507 Specifies that the all properties on the mock should have "property behavior",
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3508 meaning that setting its value will cause it to be saved and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3509 later returned when the property is requested. (this is also
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3510 known as "stubbing"). The default value for each property will be the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3511 one generated as specified by the <see cref="P:Moq.Mock.DefaultValue"/> property for the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3512 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3513 If the mock <see cref="P:Moq.Mock.DefaultValue"/> is set to <see cref="F:Moq.DefaultValue.Mock"/>,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3514 the mocked default values will also get all properties setup recursively.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3515 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3516 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3517 <member name="M:Moq.Mock`1.When(System.Func{System.Boolean})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3518 <!-- No matching elements were found for the following include tag --><include file="Mock.Generic.xdoc" path="docs/doc[@for=&quot;Mock{T}.When&quot;]/*"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3519 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3520 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3521 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3522 Verifies that a specific invocation matching the given expression was performed on the mock. Use
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3523 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3524 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3525 This example assumes that the mock has been used, and later we want to verify that a given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3526 invocation with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3527 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3528 var mock = new Mock&lt;IProcessor&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3529 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3530 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3531 // Will throw if the test code didn't call Execute with a "ping" string argument.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3532 mock.Verify(proc =&gt; proc.Execute("ping"));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3533 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3534 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3535 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3536 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3537 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3538 Verifies that a specific invocation matching the given expression was performed on the mock. Use
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3539 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3540 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3541 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3542 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3543 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3544 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3545 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},System.Func{Moq.Times})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3546 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3547 Verifies that a specific invocation matching the given expression was performed on the mock. Use
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3548 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3549 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3550 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3551 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3552 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3553 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3554 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3555 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3556 Verifies that a specific invocation matching the given expression was performed on the mock,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3557 specifying a failure error message. Use in conjuntion with the default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3558 <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3559 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3560 This example assumes that the mock has been used, and later we want to verify that a given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3561 invocation with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3562 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3563 var mock = new Mock&lt;IProcessor&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3564 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3565 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3566 // Will throw if the test code didn't call Execute with a "ping" string argument.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3567 mock.Verify(proc =&gt; proc.Execute("ping"));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3568 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3569 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3570 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3571 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},Moq.Times,System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3572 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3573 Verifies that a specific invocation matching the given expression was performed on the mock,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3574 specifying a failure error message. Use in conjuntion with the default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3575 <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3576 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3577 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3578 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3579 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3580 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3581 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},System.Func{Moq.Times},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3582 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3583 Verifies that a specific invocation matching the given expression was performed on the mock,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3584 specifying a failure error message. Use in conjuntion with the default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3585 <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3586 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3587 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3588 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3589 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3590 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3591 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3592 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3593 Verifies that a specific invocation matching the given expression was performed on the mock. Use
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3594 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3595 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3596 This example assumes that the mock has been used, and later we want to verify that a given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3597 invocation with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3598 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3599 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3600 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3601 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3602 // Will throw if the test code didn't call HasInventory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3603 mock.Verify(warehouse =&gt; warehouse.HasInventory(TALISKER, 50));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3604 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3605 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3606 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3607 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3608 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3609 Verifies that a specific invocation matching the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3610 expression was performed on the mock. Use in conjuntion
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3611 with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3612 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3613 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3614 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3615 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3616 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3617 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.Func{Moq.Times})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3618 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3619 Verifies that a specific invocation matching the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3620 expression was performed on the mock. Use in conjuntion
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3621 with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3622 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3623 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3624 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3625 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3626 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3627 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3628 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3629 Verifies that a specific invocation matching the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3630 expression was performed on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3631 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3632 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3633 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3634 and later we want to verify that a given invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3635 with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3636 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3637 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3638 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3639 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3640 // Will throw if the test code didn't call HasInventory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3641 mock.Verify(warehouse =&gt; warehouse.HasInventory(TALISKER, 50), "When filling orders, inventory has to be checked");
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3642 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3643 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3644 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3645 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times,System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3646 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3647 Verifies that a specific invocation matching the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3648 expression was performed on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3649 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3650 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3651 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3652 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3653 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3654 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3655 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3656 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3657 Verifies that a property was read on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3658 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3659 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3660 and later we want to verify that a given property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3661 was retrieved from it:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3662 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3663 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3664 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3665 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3666 // Will throw if the test code didn't retrieve the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3667 mock.VerifyGet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3668 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3669 </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">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3670 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3671 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3672 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3673 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3674 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3675 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3676 Verifies that a property was read on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3677 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3678 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3679 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3680 </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">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3681 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3682 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3683 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3684 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3685 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.Func{Moq.Times})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3686 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3687 Verifies that a property was read on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3688 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3689 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3690 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3691 </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">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3692 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3693 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3694 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3695 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3696 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3697 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3698 Verifies that a property was read on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3699 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3700 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3701 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3702 and later we want to verify that a given property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3703 was retrieved from it:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3704 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3705 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3706 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3707 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3708 // Will throw if the test code didn't retrieve the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3709 mock.VerifyGet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3710 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3711 </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">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3712 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3713 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3714 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3715 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3716 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},Moq.Times,System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3717 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3718 Verifies that a property was read on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3719 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3720 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3721 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3722 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3723 </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">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3724 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3725 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3726 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3727 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3728 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},System.Func{Moq.Times},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3729 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3730 Verifies that a property was read on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3731 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3732 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3733 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3734 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3735 </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">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3736 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3737 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3738 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3739 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3740 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3741 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3742 Verifies that a property was set on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3743 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3744 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3745 and later we want to verify that a given property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3746 was set on it:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3747 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3748 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3749 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3750 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3751 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3752 mock.VerifySet(warehouse =&gt; warehouse.IsClosed = true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3753 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3754 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="setterExpression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3755 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3756 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3757 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3758 Verifies that a property was set on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3759 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3760 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3761 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3762 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="setterExpression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3763 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3764 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},System.Func{Moq.Times})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3765 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3766 Verifies that a property was set on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3767 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3768 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3769 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3770 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="setterExpression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3771 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3772 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3773 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3774 Verifies that a property was set on the mock, specifying
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3775 a failure message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3776 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3777 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3778 and later we want to verify that a given property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3779 was set on it:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3780 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3781 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3782 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3783 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3784 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3785 mock.VerifySet(warehouse =&gt; warehouse.IsClosed = true, "Warehouse should always be closed after the action");
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3786 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3787 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3788 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3789 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},Moq.Times,System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3790 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3791 Verifies that a property was set on the mock, specifying
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3792 a failure message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3793 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3794 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3795 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3796 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3797 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3798 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},System.Func{Moq.Times},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3799 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3800 Verifies that a property was set on the mock, specifying
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3801 a failure message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3802 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3803 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3804 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3805 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3806 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3807 <member name="M:Moq.Mock`1.Raise(System.Action{`0},System.EventArgs)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3808 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3809 Raises the event referenced in <paramref name="eventExpression"/> using
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3810 the given <paramref name="args"/> argument.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3811 </summary><exception cref="T:System.ArgumentException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3812 The <paramref name="args"/> argument is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3813 invalid for the target event invocation, or the <paramref name="eventExpression"/> is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3814 not an event attach or detach expression.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3815 </exception><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3816 The following example shows how to raise a <see cref="E:System.ComponentModel.INotifyPropertyChanged.PropertyChanged"/> event:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3817 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3818 var mock = new Mock&lt;IViewModel&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3819
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3820 mock.Raise(x =&gt; x.PropertyChanged -= null, new PropertyChangedEventArgs("Name"));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3821 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3822 </example><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3823 This example shows how to invoke an event with a custom event arguments
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3824 class in a view that will cause its corresponding presenter to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3825 react by changing its state:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3826 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3827 var mockView = new Mock&lt;IOrdersView&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3828 var presenter = new OrdersPresenter(mockView.Object);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3829
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3830 // Check that the presenter has no selection by default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3831 Assert.Null(presenter.SelectedOrder);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3832
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3833 // Raise the event with a specific arguments data
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3834 mockView.Raise(v =&gt; v.SelectionChanged += null, new OrderEventArgs { Order = new Order("moq", 500) });
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3835
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3836 // Now the presenter reacted to the event, and we have a selected order
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3837 Assert.NotNull(presenter.SelectedOrder);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3838 Assert.Equal("moq", presenter.SelectedOrder.ProductName);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3839 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3840 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3841 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3842 <member name="M:Moq.Mock`1.Raise(System.Action{`0},System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3843 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3844 Raises the event referenced in <paramref name="eventExpression"/> using
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3845 the given <paramref name="args"/> argument for a non-EventHandler typed event.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3846 </summary><exception cref="T:System.ArgumentException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3847 The <paramref name="args"/> arguments are
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3848 invalid for the target event invocation, or the <paramref name="eventExpression"/> is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3849 not an event attach or detach expression.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3850 </exception><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3851 The following example shows how to raise a custom event that does not adhere to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3852 the standard <c>EventHandler</c>:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3853 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3854 var mock = new Mock&lt;IViewModel&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3855
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3856 mock.Raise(x =&gt; x.MyEvent -= null, "Name", bool, 25);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3857 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3858 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3859 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3860 <member name="P:Moq.Mock`1.Object">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3861 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3862 Exposes the mocked object instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3863 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3864 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3865 <member name="P:Moq.Mock`1.DelegateInterfaceMethod">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3866 <inheritdoc />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3867 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3868 <member name="T:Moq.MockLegacyExtensions">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3869 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3870 Provides legacy API members as extensions so that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3871 existing code continues to compile, but new code
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3872 doesn't see then.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3873 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3874 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3875 <member name="M:Moq.MockLegacyExtensions.SetupSet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3876 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3877 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3878 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3879 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3880 <member name="M:Moq.MockLegacyExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3881 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3882 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3883 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3884 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3885 <member name="M:Moq.MockLegacyExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1,System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3886 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3887 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3888 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3889 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3890 <member name="T:Moq.ObsoleteMockExtensions">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3891 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3892 Provides additional methods on mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3893 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3894 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3895 Provided as extension methods as they confuse the compiler
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3896 with the overloads taking Action.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3897 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3898 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3899 <member name="M:Moq.ObsoleteMockExtensions.SetupSet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3900 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3901 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3902 to a property setter, regardless of its value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3903 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3904 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3905 If more than one setup is set for the same property setter,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3906 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3907 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3908 <typeparam name="TProperty">Type of the property. Typically omitted as it can be inferred from the expression.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3909 <typeparam name="T">Type of the mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3910 <param name="mock">The target mock for the setup.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3911 <param name="expression">Lambda expression that specifies the property setter.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3912 <example group="setups">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3913 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3914 mock.SetupSet(x =&gt; x.Suspended);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3915 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3916 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3917 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3918 This method is not legacy, but must be on an extension method to avoid
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3919 confusing the compiler with the new Action syntax.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3920 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3921 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3922 <member name="M:Moq.ObsoleteMockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3923 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3924 Verifies that a property has been set on the mock, regarless of its value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3925 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3926 <example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3927 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3928 and later we want to verify that a given invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3929 with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3930 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3931 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3932 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3933 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3934 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3935 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3936 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3937 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3938 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3939 <param name="expression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3940 <param name="mock">The mock instance.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3941 <typeparam name="T">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3942 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3943 be inferred from the expression's return type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3944 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3945 <member name="M:Moq.ObsoleteMockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3946 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3947 Verifies that a property has been set on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3948 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3949 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3950 <example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3951 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3952 and later we want to verify that a given invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3953 with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3954 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3955 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3956 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3957 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3958 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3959 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3960 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3961 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3962 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3963 <param name="expression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3964 <param name="failMessage">Message to show if verification fails.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3965 <param name="mock">The mock instance.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3966 <typeparam name="T">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3967 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3968 be inferred from the expression's return type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3969 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3970 <member name="M:Moq.ObsoleteMockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3971 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3972 Verifies that a property has been set on the mock, regardless
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3973 of the value but only the specified number of times.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3974 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3975 <example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3976 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3977 and later we want to verify that a given invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3978 with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3979 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3980 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3981 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3982 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3983 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3984 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3985 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3986 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3987 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3988 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3989 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3990 <param name="mock">The mock instance.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3991 <typeparam name="T">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3992 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3993 <param name="expression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3994 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3995 be inferred from the expression's return type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3996 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3997 <member name="M:Moq.ObsoleteMockExtensions.VerifySet``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},Moq.Times,System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3998 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3999 Verifies that a property has been set on the mock, regardless
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4000 of the value but only the specified number of times, and specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4001 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4002 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4003 <example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4004 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4005 and later we want to verify that a given invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4006 with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4007 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4008 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4009 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4010 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4011 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4012 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4013 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4014 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4015 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4016 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4017 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4018 <param name="mock">The mock instance.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4019 <typeparam name="T">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4020 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4021 <param name="failMessage">Message to show if verification fails.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4022 <param name="expression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4023 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4024 be inferred from the expression's return type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4025 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4026 <member name="T:Moq.SequenceExtensions">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4027 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4028 Helper for sequencing return values in the same method.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4029 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4030 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4031 <member name="M:Moq.SequenceExtensions.SetupSequence``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4032 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4033 Return a sequence of values, once per call.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4034 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4035 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4036 <member name="M:Moq.ExpressionExtensions.ToLambda(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4037 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4038 Casts the expression to a lambda expression, removing
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4039 a cast if there's any.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4040 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4041 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4042 <member name="M:Moq.ExpressionExtensions.ToMethodCall(System.Linq.Expressions.LambdaExpression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4043 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4044 Casts the body of the lambda expression to a <see cref="T:System.Linq.Expressions.MethodCallExpression"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4045 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4046 <exception cref="T:System.ArgumentException">If the body is not a method call.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4047 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4048 <member name="M:Moq.ExpressionExtensions.ToPropertyInfo(System.Linq.Expressions.LambdaExpression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4049 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4050 Converts the body of the lambda expression into the <see cref="T:System.Reflection.PropertyInfo"/> referenced by it.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4051 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4052 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4053 <member name="M:Moq.ExpressionExtensions.IsProperty(System.Linq.Expressions.LambdaExpression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4054 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4055 Checks whether the body of the lambda expression is a property access.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4056 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4057 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4058 <member name="M:Moq.ExpressionExtensions.IsProperty(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4059 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4060 Checks whether the expression is a property access.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4061 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4062 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4063 <member name="M:Moq.ExpressionExtensions.IsPropertyIndexer(System.Linq.Expressions.LambdaExpression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4064 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4065 Checks whether the body of the lambda expression is a property indexer, which is true
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4066 when the expression is an <see cref="T:System.Linq.Expressions.MethodCallExpression"/> whose
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4067 <see cref="P:System.Linq.Expressions.MethodCallExpression.Method"/> has <see cref="P:System.Reflection.MethodBase.IsSpecialName"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4068 equal to <see langword="true"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4069 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4070 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4071 <member name="M:Moq.ExpressionExtensions.IsPropertyIndexer(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4072 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4073 Checks whether the expression is a property indexer, which is true
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4074 when the expression is an <see cref="T:System.Linq.Expressions.MethodCallExpression"/> whose
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4075 <see cref="P:System.Linq.Expressions.MethodCallExpression.Method"/> has <see cref="P:System.Reflection.MethodBase.IsSpecialName"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4076 equal to <see langword="true"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4077 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4078 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4079 <member name="M:Moq.ExpressionExtensions.CastTo``1(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4080 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4081 Creates an expression that casts the given expression to the <typeparamref name="T"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4082 type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4083 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4084 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4085 <member name="M:Moq.ExpressionExtensions.ToStringFixed(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4086 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4087 TODO: remove this code when https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=331583
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4088 is fixed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4089 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4090 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4091 <member name="M:Moq.ExpressionExtensions.GetCallInfo(System.Linq.Expressions.LambdaExpression,Moq.Mock)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4092 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4093 Extracts, into a common form, information from a <see cref="T:System.Linq.Expressions.LambdaExpression"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4094 around either a <see cref="T:System.Linq.Expressions.MethodCallExpression"/> (for a normal method call)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4095 or a <see cref="T:System.Linq.Expressions.InvocationExpression"/> (for a delegate invocation).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4096 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4097 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4098 <member name="M:Moq.Extensions.IsDelegate(System.Type)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4099 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4100 Tests if a type is a delegate type (subclasses <see cref="T:System.Delegate"/>).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4101 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4102 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4103 <member name="T:Moq.Evaluator">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4104 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4105 Provides partial evaluation of subtrees, whenever they can be evaluated locally.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4106 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4107 <author>Matt Warren: http://blogs.msdn.com/mattwar</author>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4108 <contributor>Documented by InSTEDD: http://www.instedd.org</contributor>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4109 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4110 <member name="M:Moq.Evaluator.PartialEval(System.Linq.Expressions.Expression,System.Func{System.Linq.Expressions.Expression,System.Boolean})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4111 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4112 Performs evaluation and replacement of independent sub-trees
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4113 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4114 <param name="expression">The root of the expression tree.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4115 <param name="fnCanBeEvaluated">A function that decides whether a given expression
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4116 node can be part of the local function.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4117 <returns>A new tree with sub-trees evaluated and replaced.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4118 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4119 <member name="M:Moq.Evaluator.PartialEval(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4120 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4121 Performs evaluation and replacement of independent sub-trees
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4122 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4123 <param name="expression">The root of the expression tree.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4124 <returns>A new tree with sub-trees evaluated and replaced.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4125 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4126 <member name="T:Moq.Evaluator.SubtreeEvaluator">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4127 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4128 Evaluates and replaces sub-trees when first candidate is reached (top-down)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4129 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4130 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4131 <member name="T:Moq.Evaluator.Nominator">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4132 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4133 Performs bottom-up analysis to determine which nodes can possibly
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4134 be part of an evaluated sub-tree.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4135 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4136 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4137 <member name="M:Moq.Guard.NotNull``1(System.Linq.Expressions.Expression{System.Func{``0}},``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4138 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4139 Ensures the given <paramref name="value"/> is not null.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4140 Throws <see cref="T:System.ArgumentNullException"/> otherwise.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4141 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4142 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4143 <member name="M:Moq.Guard.NotNullOrEmpty(System.Linq.Expressions.Expression{System.Func{System.String}},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4144 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4145 Ensures the given string <paramref name="value"/> is not null or empty.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4146 Throws <see cref="T:System.ArgumentNullException"/> in the first case, or
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4147 <see cref="T:System.ArgumentException"/> in the latter.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4148 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4149 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4150 <member name="M:Moq.Guard.NotOutOfRangeInclusive``1(System.Linq.Expressions.Expression{System.Func{``0}},``0,``0,``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4151 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4152 Checks an argument to ensure it is in the specified range including the edges.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4153 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4154 <typeparam name="T">Type of the argument to check, it must be an <see cref="T:System.IComparable"/> type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4155 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4156 <param name="reference">The expression containing the name of the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4157 <param name="value">The argument value to check.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4158 <param name="from">The minimun allowed value for the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4159 <param name="to">The maximun allowed value for the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4160 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4161 <member name="M:Moq.Guard.NotOutOfRangeExclusive``1(System.Linq.Expressions.Expression{System.Func{``0}},``0,``0,``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4162 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4163 Checks an argument to ensure it is in the specified range excluding the edges.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4164 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4165 <typeparam name="T">Type of the argument to check, it must be an <see cref="T:System.IComparable"/> type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4166 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4167 <param name="reference">The expression containing the name of the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4168 <param name="value">The argument value to check.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4169 <param name="from">The minimun allowed value for the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4170 <param name="to">The maximun allowed value for the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4171 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4172 <member name="T:Moq.IMocked`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4173 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4174 Implemented by all generated mock object instances.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4175 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4176 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4177 <member name="T:Moq.IMocked">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4178 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4179 Implemented by all generated mock object instances.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4180 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4181 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4182 <member name="P:Moq.IMocked.Mock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4183 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4184 Reference the Mock that contains this as the <c>mock.Object</c> value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4185 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4186 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4187 <member name="P:Moq.IMocked`1.Mock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4188 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4189 Reference the Mock that contains this as the <c>mock.Object</c> value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4190 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4191 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4192 <member name="T:Moq.Interceptor">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4193 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4194 Implements the actual interception and method invocation for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4195 all mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4196 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4197 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4198 <member name="T:Moq.Language.Flow.ISetupSetter`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4199 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4200 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4201 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4202 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4203 <member name="T:Moq.Language.ICallbackSetter`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4204 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4205 Defines the <c>Callback</c> verb for property setter setups.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4206 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4207 <typeparam name="TProperty">Type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4208 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4209 <member name="M:Moq.Language.ICallbackSetter`1.Callback(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4210 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4211 Specifies a callback to invoke when the property is set that receives the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4212 property value being set.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4213 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4214 <param name="action">Callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4215 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4216 Invokes the given callback with the property value being set.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4217 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4218 mock.SetupSet(x => x.Suspended)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4219 .Callback((bool state) => Console.WriteLine(state));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4220 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4221 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4222 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4223 <member name="T:Moq.It">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4224 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4225 Allows the specification of a matching condition for an
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4226 argument in a method invocation, rather than a specific
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4227 argument value. "It" refers to the argument being matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4228 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4229 This class allows the setup to match a method invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4230 with an arbitrary value, with a value in a specified range, or
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4231 even one that matches a given predicate.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4232 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4233 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4234 <member name="M:Moq.It.IsAny``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4235 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4236 Matches any value of the given <typeparamref name="TValue"/> type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4237 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4238 Typically used when the actual argument value for a method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4239 call is not relevant.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4240 </remarks><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4241 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4242 // Throws an exception for a call to Remove with any string value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4243 mock.Setup(x =&gt; x.Remove(It.IsAny&lt;string&gt;())).Throws(new InvalidOperationException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4244 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4245 </example><typeparam name="TValue">Type of the value.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4246 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4247 <member name="M:Moq.It.IsNotNull``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4248 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4249 Matches any value of the given <typeparamref name="TValue"/> type, except null.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4250 </summary><typeparam name="TValue">Type of the value.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4251 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4252 <member name="M:Moq.It.Is``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4253 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4254 Matches any value that satisfies the given predicate.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4255 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="match">The predicate used to match the method argument.</param><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4256 Allows the specification of a predicate to perform matching
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4257 of method call arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4258 </remarks><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4259 This example shows how to return the value <c>1</c> whenever the argument to the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4260 <c>Do</c> method is an even number.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4261 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4262 mock.Setup(x =&gt; x.Do(It.Is&lt;int&gt;(i =&gt; i % 2 == 0)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4263 .Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4264 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4265 This example shows how to throw an exception if the argument to the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4266 method is a negative number:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4267 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4268 mock.Setup(x =&gt; x.GetUser(It.Is&lt;int&gt;(i =&gt; i &lt; 0)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4269 .Throws(new ArgumentException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4270 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4271 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4272 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4273 <member name="M:Moq.It.IsInRange``1(``0,``0,Moq.Range)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4274 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4275 Matches any value that is in the range specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4276 </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">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4277 The kind of range. See <see cref="T:Moq.Range"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4278 </param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4279 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4280 with an integer argument within the 0..100 range.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4281 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4282 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4283 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4284 It.IsInRange(0, 100, Range.Inclusive)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4285 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4286 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4287 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4288 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4289 <member name="M:Moq.It.IsIn``1(System.Collections.Generic.IEnumerable{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4290 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4291 Matches any value that is present in the sequence specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4292 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="items">The sequence of possible values.</param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4293 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4294 with an integer argument with value from a list.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4295 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4296 var values = new List&lt;int&gt; { 1, 2, 3 };
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4297
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4298 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4299 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4300 It.IsIn(values)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4301 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4302 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4303 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4304 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4305 <member name="M:Moq.It.IsIn``1(``0[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4306 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4307 Matches any value that is present in the sequence specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4308 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="items">The sequence of possible values.</param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4309 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4310 with an integer argument with a value of 1, 2, or 3.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4311 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4312 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4313 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4314 It.IsIn(1, 2, 3)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4315 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4316 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4317 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4318 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4319 <member name="M:Moq.It.IsNotIn``1(System.Collections.Generic.IEnumerable{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4320 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4321 Matches any value that is not found in the sequence specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4322 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="items">The sequence of disallowed values.</param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4323 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4324 with an integer argument with value not found from a list.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4325 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4326 var values = new List&lt;int&gt; { 1, 2, 3 };
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4327
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4328 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4329 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4330 It.IsNotIn(values)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4331 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4332 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4333 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4334 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4335 <member name="M:Moq.It.IsNotIn``1(``0[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4336 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4337 Matches any value that is not found in the sequence specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4338 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="items">The sequence of disallowed values.</param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4339 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4340 with an integer argument of any value except 1, 2, or 3.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4341 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4342 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4343 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4344 It.IsNotIn(1, 2, 3)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4345 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4346 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4347 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4348 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4349 <member name="M:Moq.It.IsRegex(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4350 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4351 Matches a string argument if it matches the given regular expression pattern.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4352 </summary><param name="regex">The pattern to use to match the string argument value.</param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4353 The following example shows how to expect a call to a method where the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4354 string argument matches the given regular expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4355 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4356 mock.Setup(x =&gt; x.Check(It.IsRegex("[a-z]+"))).Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4357 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4358 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4359 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4360 <member name="M:Moq.It.IsRegex(System.String,System.Text.RegularExpressions.RegexOptions)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4361 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4362 Matches a string argument if it matches the given regular expression pattern.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4363 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4364 The following example shows how to expect a call to a method where the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4365 string argument matches the given regular expression, in a case insensitive way:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4366 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4367 mock.Setup(x =&gt; x.Check(It.IsRegex("[a-z]+", RegexOptions.IgnoreCase))).Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4368 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4369 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4370 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4371 <member name="T:Moq.Matchers.MatcherAttributeMatcher">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4372 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4373 Matcher to treat static functions as matchers.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4374
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4375 mock.Setup(x => x.StringMethod(A.MagicString()));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4376
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4377 public static class A
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4378 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4379 [Matcher]
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4380 public static string MagicString() { return null; }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4381 public static bool MagicString(string arg)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4382 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4383 return arg == "magic";
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4384 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4385 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4386
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4387 Will succeed if: mock.Object.StringMethod("magic");
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4388 and fail with any other call.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4389 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4390 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4391 <member name="T:Moq.MockBehavior">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4392 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4393 Options to customize the behavior of the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4394 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4395 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4396 <member name="F:Moq.MockBehavior.Strict">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4397 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4398 Causes the mock to always throw
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4399 an exception for invocations that don't have a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4400 corresponding setup.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4401 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4402 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4403 <member name="F:Moq.MockBehavior.Loose">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4404 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4405 Will never throw exceptions, returning default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4406 values when necessary (null for reference types,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4407 zero for value types or empty enumerables and arrays).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4408 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4409 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4410 <member name="F:Moq.MockBehavior.Default">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4411 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4412 Default mock behavior, which equals <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4413 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4414 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4415 <member name="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4416 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4417 Exception thrown by mocks when setups are not matched,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4418 the mock is not properly setup, etc.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4419 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4420 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4421 A distinct exception type is provided so that exceptions
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4422 thrown by the mock can be differentiated in tests that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4423 expect other exceptions to be thrown (i.e. ArgumentException).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4424 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4425 Richer exception hierarchy/types are not provided as
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4426 tests typically should <b>not</b> catch or expect exceptions
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4427 from the mocks. These are typically the result of changes
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4428 in the tested class or its collaborators implementation, and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4429 result in fixes in the mock setup so that they dissapear and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4430 allow the test to pass.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4431 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4432 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4433 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4434 <member name="M:Moq.MockException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4435 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4436 Supports the serialization infrastructure.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4437 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4438 <param name="info">Serialization information.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4439 <param name="context">Streaming context.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4440 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4441 <member name="M:Moq.MockException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4442 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4443 Supports the serialization infrastructure.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4444 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4445 <param name="info">Serialization information.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4446 <param name="context">Streaming context.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4447 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4448 <member name="P:Moq.MockException.IsVerificationError">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4449 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4450 Indicates whether this exception is a verification fault raised by Verify()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4451 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4452 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4453 <member name="T:Moq.MockException.ExceptionReason">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4454 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4455 Made internal as it's of no use for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4456 consumers, but it's important for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4457 our own tests.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4458 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4459 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4460 <member name="T:Moq.MockVerificationException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4461 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4462 Used by the mock factory to accumulate verification
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4463 failures.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4464 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4465 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4466 <member name="M:Moq.MockVerificationException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4467 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4468 Supports the serialization infrastructure.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4469 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4470 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4471 <member name="T:Moq.Properties.Resources">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4472 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4473 A strongly-typed resource class, for looking up localized strings, etc.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4474 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4475 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4476 <member name="P:Moq.Properties.Resources.ResourceManager">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4477 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4478 Returns the cached ResourceManager instance used by this class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4479 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4480 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4481 <member name="P:Moq.Properties.Resources.Culture">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4482 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4483 Overrides the current thread's CurrentUICulture property for all
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4484 resource lookups using this strongly typed resource class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4485 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4486 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4487 <member name="P:Moq.Properties.Resources.AlreadyInitialized">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4488 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4489 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..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4490 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4491 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4492 <member name="P:Moq.Properties.Resources.ArgumentCannotBeEmpty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4493 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4494 Looks up a localized string similar to Value cannot be an empty string..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4495 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4496 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4497 <member name="P:Moq.Properties.Resources.AsMustBeInterface">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4498 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4499 Looks up a localized string similar to Can only add interfaces to the mock..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4500 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4501 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4502 <member name="P:Moq.Properties.Resources.CantSetReturnValueForVoid">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4503 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4504 Looks up a localized string similar to Can&apos;t set return value for void method {0}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4505 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4506 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4507 <member name="P:Moq.Properties.Resources.ConstructorArgsForDelegate">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4508 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4509 Looks up a localized string similar to Constructor arguments cannot be passed for delegate mocks..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4510 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4511 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4512 <member name="P:Moq.Properties.Resources.ConstructorArgsForInterface">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4513 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4514 Looks up a localized string similar to Constructor arguments cannot be passed for interface mocks..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4515 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4516 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4517 <member name="P:Moq.Properties.Resources.ConstructorNotFound">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4518 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4519 Looks up a localized string similar to A matching constructor for the given arguments was not found on the mocked type..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4520 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4521 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4522 <member name="P:Moq.Properties.Resources.EventNofFound">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4523 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4524 Looks up a localized string similar to Could not locate event for attach or detach method {0}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4525 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4526 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4527 <member name="P:Moq.Properties.Resources.FieldsNotSupported">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4528 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4529 Looks up a localized string similar to Expression {0} involves a field access, which is not supported. Use properties instead..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4530 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4531 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4532 <member name="P:Moq.Properties.Resources.InvalidMockClass">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4533 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4534 Looks up a localized string similar to Type to mock must be an interface or an abstract or non-sealed class. .
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4535 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4536 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4537 <member name="P:Moq.Properties.Resources.InvalidMockGetType">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4538 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4539 Looks up a localized string similar to Cannot retrieve a mock with the given object type {0} as it&apos;s not the main type of the mock or any of its additional interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4540 Please cast the argument to one of the supported types: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4541 Remember that there&apos;s no generics covariance in the CLR, so your object must be one of these types in order for the call to succeed..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4542 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4543 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4544 <member name="P:Moq.Properties.Resources.LinqBinaryOperatorNotSupported">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4545 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4546 Looks up a localized string similar to The equals (&quot;==&quot; or &quot;=&quot; in VB) and the conditional &apos;and&apos; (&quot;&amp;&amp;&quot; or &quot;AndAlso&quot; in VB) operators are the only ones supported in the query specification expression. Unsupported expression: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4547 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4548 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4549 <member name="P:Moq.Properties.Resources.LinqMethodNotSupported">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4550 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4551 Looks up a localized string similar to LINQ method &apos;{0}&apos; not supported..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4552 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4553 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4554 <member name="P:Moq.Properties.Resources.LinqMethodNotVirtual">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4555 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4556 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}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4557 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4558 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4559 <member name="P:Moq.Properties.Resources.MemberMissing">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4560 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4561 Looks up a localized string similar to Member {0}.{1} does not exist..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4562 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4563 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4564 <member name="P:Moq.Properties.Resources.MethodIsPublic">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4565 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4566 Looks up a localized string similar to Method {0}.{1} is public. Use strong-typed Expect overload instead:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4567 mock.Setup(x =&gt; x.{1}());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4568 .
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4569 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4570 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4571 <member name="P:Moq.Properties.Resources.MockExceptionMessage">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4572 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4573 Looks up a localized string similar to {0} invocation failed with mock behavior {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4574 {2}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4575 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4576 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4577 <member name="P:Moq.Properties.Resources.MoreThanNCalls">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4578 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4579 Looks up a localized string similar to Expected only {0} calls to {1}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4580 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4581 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4582 <member name="P:Moq.Properties.Resources.MoreThanOneCall">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4583 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4584 Looks up a localized string similar to Expected only one call to {0}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4585 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4586 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4587 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtLeast">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4588 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4589 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4590 Expected invocation on the mock at least {2} times, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4591 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4592 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4593 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtLeastOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4594 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4595 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4596 Expected invocation on the mock at least once, but was never performed: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4597 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4598 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4599 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtMost">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4600 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4601 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4602 Expected invocation on the mock at most {3} times, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4603 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4604 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4605 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtMostOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4606 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4607 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4608 Expected invocation on the mock at most once, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4609 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4610 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4611 <member name="P:Moq.Properties.Resources.NoMatchingCallsBetweenExclusive">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4612 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4613 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4614 Expected invocation on the mock between {2} and {3} times (Exclusive), but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4615 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4616 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4617 <member name="P:Moq.Properties.Resources.NoMatchingCallsBetweenInclusive">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4618 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4619 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4620 Expected invocation on the mock between {2} and {3} times (Inclusive), but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4621 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4622 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4623 <member name="P:Moq.Properties.Resources.NoMatchingCallsExactly">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4624 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4625 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4626 Expected invocation on the mock exactly {2} times, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4627 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4628 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4629 <member name="P:Moq.Properties.Resources.NoMatchingCallsNever">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4630 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4631 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4632 Expected invocation on the mock should never have been performed, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4633 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4634 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4635 <member name="P:Moq.Properties.Resources.NoMatchingCallsOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4636 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4637 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4638 Expected invocation on the mock once, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4639 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4640 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4641 <member name="P:Moq.Properties.Resources.NoSetup">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4642 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4643 Looks up a localized string similar to All invocations on the mock must have a corresponding setup..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4644 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4645 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4646 <member name="P:Moq.Properties.Resources.ObjectInstanceNotMock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4647 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4648 Looks up a localized string similar to Object instance was not created by Moq..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4649 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4650 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4651 <member name="P:Moq.Properties.Resources.OutExpressionMustBeConstantValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4652 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4653 Looks up a localized string similar to Out expression must evaluate to a constant value..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4654 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4655 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4656 <member name="P:Moq.Properties.Resources.PropertyGetNotFound">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4657 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4658 Looks up a localized string similar to Property {0}.{1} does not have a getter..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4659 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4660 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4661 <member name="P:Moq.Properties.Resources.PropertyMissing">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4662 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4663 Looks up a localized string similar to Property {0}.{1} does not exist..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4664 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4665 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4666 <member name="P:Moq.Properties.Resources.PropertyNotReadable">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4667 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4668 Looks up a localized string similar to Property {0}.{1} is write-only..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4669 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4670 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4671 <member name="P:Moq.Properties.Resources.PropertyNotWritable">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4672 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4673 Looks up a localized string similar to Property {0}.{1} is read-only..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4674 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4675 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4676 <member name="P:Moq.Properties.Resources.PropertySetNotFound">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4677 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4678 Looks up a localized string similar to Property {0}.{1} does not have a setter..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4679 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4680 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4681 <member name="P:Moq.Properties.Resources.RaisedUnassociatedEvent">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4682 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4683 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..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4684 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4685 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4686 <member name="P:Moq.Properties.Resources.RefExpressionMustBeConstantValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4687 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4688 Looks up a localized string similar to Ref expression must evaluate to a constant value..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4689 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4690 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4691 <member name="P:Moq.Properties.Resources.ReturnValueRequired">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4692 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4693 Looks up a localized string similar to Invocation needs to return a value and therefore must have a corresponding setup that provides it..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4694 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4695 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4696 <member name="P:Moq.Properties.Resources.SetupLambda">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4697 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4698 Looks up a localized string similar to A lambda expression is expected as the argument to It.Is&lt;T&gt;..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4699 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4700 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4701 <member name="P:Moq.Properties.Resources.SetupNever">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4702 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4703 Looks up a localized string similar to Invocation {0} should not have been made..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4704 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4705 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4706 <member name="P:Moq.Properties.Resources.SetupNotMethod">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4707 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4708 Looks up a localized string similar to Expression is not a method invocation: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4709 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4710 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4711 <member name="P:Moq.Properties.Resources.SetupNotProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4712 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4713 Looks up a localized string similar to Expression is not a property access: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4714 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4715 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4716 <member name="P:Moq.Properties.Resources.SetupNotSetter">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4717 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4718 Looks up a localized string similar to Expression is not a property setter invocation..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4719 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4720 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4721 <member name="P:Moq.Properties.Resources.SetupOnNonMemberMethod">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4722 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4723 Looks up a localized string similar to Expression references a method that does not belong to the mocked object: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4724 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4725 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4726 <member name="P:Moq.Properties.Resources.SetupOnNonOverridableMember">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4727 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4728 Looks up a localized string similar to Invalid setup on a non-virtual (overridable in VB) member: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4729 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4730 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4731 <member name="P:Moq.Properties.Resources.TypeNotImplementInterface">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4732 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4733 Looks up a localized string similar to Type {0} does not implement required interface {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4734 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4735 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4736 <member name="P:Moq.Properties.Resources.TypeNotInheritFromType">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4737 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4738 Looks up a localized string similar to Type {0} does not from required type {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4739 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4740 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4741 <member name="P:Moq.Properties.Resources.UnexpectedPublicProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4742 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4743 Looks up a localized string similar to To specify a setup for public property {0}.{1}, use the typed overloads, such as:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4744 mock.Setup(x =&gt; x.{1}).Returns(value);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4745 mock.SetupGet(x =&gt; x.{1}).Returns(value); //equivalent to previous one
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4746 mock.SetupSet(x =&gt; x.{1}).Callback(callbackDelegate);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4747 .
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4748 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4749 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4750 <member name="P:Moq.Properties.Resources.UnsupportedExpression">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4751 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4752 Looks up a localized string similar to Unsupported expression: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4753 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4754 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4755 <member name="P:Moq.Properties.Resources.UnsupportedIntermediateExpression">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4756 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4757 Looks up a localized string similar to Only property accesses are supported in intermediate invocations on a setup. Unsupported expression {0}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4758 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4759 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4760 <member name="P:Moq.Properties.Resources.UnsupportedIntermediateType">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4761 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4762 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}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4763 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4764 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4765 <member name="P:Moq.Properties.Resources.UnsupportedMatcherParamsForSetter">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4766 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4767 Looks up a localized string similar to Setter expression cannot use argument matchers that receive parameters..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4768 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4769 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4770 <member name="P:Moq.Properties.Resources.UnsupportedMember">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4771 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4772 Looks up a localized string similar to Member {0} is not supported for protected mocking..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4773 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4774 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4775 <member name="P:Moq.Properties.Resources.UnsupportedNonStaticMatcherForSetter">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4776 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4777 Looks up a localized string similar to Setter expression can only use static custom matchers..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4778 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4779 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4780 <member name="P:Moq.Properties.Resources.VerficationFailed">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4781 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4782 Looks up a localized string similar to The following setups were not matched:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4783 {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4784 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4785 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4786 <member name="P:Moq.Properties.Resources.VerifyOnNonVirtualMember">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4787 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4788 Looks up a localized string similar to Invalid verify on a non-virtual (overridable in VB) member: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4789 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4790 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4791 <member name="T:Moq.Protected.IProtectedMock`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4792 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4793 Allows setups to be specified for protected members by using their
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4794 name as a string, rather than strong-typing them which is not possible
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4795 due to their visibility.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4796 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4797 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4798 <member name="M:Moq.Protected.IProtectedMock`1.Setup(System.String,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4799 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4800 Specifies a setup for a void method invocation with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4801 <paramref name="voidMethodName"/>, optionally specifying arguments for the method call.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4802 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4803 <param name="voidMethodName">The name of the void method to be invoked.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4804 <param name="args">The optional arguments for the invocation. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4805 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4806 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4807 <member name="M:Moq.Protected.IProtectedMock`1.Setup``1(System.String,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4808 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4809 Specifies a setup for an invocation on a property or a non void method with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4810 <paramref name="methodOrPropertyName"/>, optionally specifying arguments for the method call.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4811 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4812 <param name="methodOrPropertyName">The name of the method or property to be invoked.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4813 <param name="args">The optional arguments for the invocation. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4814 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4815 <typeparam name="TResult">The return type of the method or property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4816 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4817 <member name="M:Moq.Protected.IProtectedMock`1.SetupGet``1(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4818 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4819 Specifies a setup for an invocation on a property getter with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4820 <paramref name="propertyName"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4821 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4822 <param name="propertyName">The name of the property.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4823 <typeparam name="TProperty">The type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4824 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4825 <member name="M:Moq.Protected.IProtectedMock`1.SetupSet``1(System.String,System.Object)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4826 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4827 Specifies a setup for an invocation on a property setter with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4828 <paramref name="propertyName"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4829 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4830 <param name="propertyName">The name of the property.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4831 <param name="value">The property value. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4832 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4833 <typeparam name="TProperty">The type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4834 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4835 <member name="M:Moq.Protected.IProtectedMock`1.Verify(System.String,Moq.Times,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4836 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4837 Specifies a verify for a void method with the given <paramref name="methodName"/>,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4838 optionally specifying arguments for the method call. Use in conjuntion with the default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4839 <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4840 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4841 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4842 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4843 <param name="methodName">The name of the void method to be verified.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4844 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4845 <param name="args">The optional arguments for the invocation. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4846 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4847 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4848 <member name="M:Moq.Protected.IProtectedMock`1.Verify``1(System.String,Moq.Times,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4849 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4850 Specifies a verify for an invocation on a property or a non void method with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4851 <paramref name="methodName"/>, optionally specifying arguments for the method call.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4852 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4853 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4854 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4855 <param name="methodName">The name of the method or property to be invoked.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4856 <param name="args">The optional arguments for the invocation. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4857 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4858 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4859 <typeparam name="TResult">The type of return value from the expression.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4860 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4861 <member name="M:Moq.Protected.IProtectedMock`1.VerifyGet``1(System.String,Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4862 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4863 Specifies a verify for an invocation on a property getter with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4864 <paramref name="propertyName"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4865 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4866 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4867 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4868 <param name="propertyName">The name of the property.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4869 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4870 <typeparam name="TProperty">The type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4871 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4872 <member name="M:Moq.Protected.IProtectedMock`1.VerifySet``1(System.String,Moq.Times,System.Object)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4873 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4874 Specifies a setup for an invocation on a property setter with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4875 <paramref name="propertyName"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4876 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4877 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4878 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4879 <param name="propertyName">The name of the property.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4880 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4881 <param name="value">The property value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4882 <typeparam name="TProperty">The type of the property. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4883 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4884 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4885 <member name="T:Moq.Protected.ItExpr">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4886 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4887 Allows the specification of a matching condition for an
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4888 argument in a protected member setup, rather than a specific
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4889 argument value. "ItExpr" refers to the argument being matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4890 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4891 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4892 <para>Use this variant of argument matching instead of
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4893 <see cref="T:Moq.It"/> for protected setups.</para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4894 This class allows the setup to match a method invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4895 with an arbitrary value, with a value in a specified range, or
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4896 even one that matches a given predicate, or null.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4897 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4898 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4899 <member name="M:Moq.Protected.ItExpr.IsNull``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4900 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4901 Matches a null value of the given <typeparamref name="TValue"/> type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4902 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4903 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4904 Required for protected mocks as the null value cannot be used
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4905 directly as it prevents proper method overload selection.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4906 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4907 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4908 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4909 // Throws an exception for a call to Remove with a null string value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4910 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4911 .Setup("Remove", ItExpr.IsNull&lt;string&gt;())
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4912 .Throws(new InvalidOperationException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4913 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4914 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4915 <typeparam name="TValue">Type of the value.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4916 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4917 <member name="M:Moq.Protected.ItExpr.IsAny``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4918 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4919 Matches any value of the given <typeparamref name="TValue"/> type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4920 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4921 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4922 Typically used when the actual argument value for a method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4923 call is not relevant.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4924 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4925 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4926 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4927 // Throws an exception for a call to Remove with any string value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4928 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4929 .Setup("Remove", ItExpr.IsAny&lt;string&gt;())
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4930 .Throws(new InvalidOperationException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4931 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4932 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4933 <typeparam name="TValue">Type of the value.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4934 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4935 <member name="M:Moq.Protected.ItExpr.Is``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4936 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4937 Matches any value that satisfies the given predicate.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4938 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4939 <typeparam name="TValue">Type of the argument to check.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4940 <param name="match">The predicate used to match the method argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4941 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4942 Allows the specification of a predicate to perform matching
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4943 of method call arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4944 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4945 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4946 This example shows how to return the value <c>1</c> whenever the argument to the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4947 <c>Do</c> method is an even number.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4948 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4949 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4950 .Setup("Do", ItExpr.Is&lt;int&gt;(i =&gt; i % 2 == 0))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4951 .Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4952 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4953 This example shows how to throw an exception if the argument to the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4954 method is a negative number:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4955 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4956 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4957 .Setup("GetUser", ItExpr.Is&lt;int&gt;(i =&gt; i &lt; 0))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4958 .Throws(new ArgumentException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4959 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4960 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4961 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4962 <member name="M:Moq.Protected.ItExpr.IsInRange``1(``0,``0,Moq.Range)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4963 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4964 Matches any value that is in the range specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4965 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4966 <typeparam name="TValue">Type of the argument to check.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4967 <param name="from">The lower bound of the range.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4968 <param name="to">The upper bound of the range.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4969 <param name="rangeKind">The kind of range. See <see cref="T:Moq.Range"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4970 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4971 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4972 with an integer argument within the 0..100 range.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4973 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4974 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4975 .Setup("HasInventory",
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4976 ItExpr.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4977 ItExpr.IsInRange(0, 100, Range.Inclusive))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4978 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4979 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4980 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4981 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4982 <member name="M:Moq.Protected.ItExpr.IsRegex(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4983 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4984 Matches a string argument if it matches the given regular expression pattern.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4985 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4986 <param name="regex">The pattern to use to match the string argument value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4987 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4988 The following example shows how to expect a call to a method where the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4989 string argument matches the given regular expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4990 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4991 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4992 .Setup("Check", ItExpr.IsRegex("[a-z]+"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4993 .Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4994 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4995 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4996 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4997 <member name="M:Moq.Protected.ItExpr.IsRegex(System.String,System.Text.RegularExpressions.RegexOptions)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4998 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4999 Matches a string argument if it matches the given regular expression pattern.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5000 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5001 <param name="regex">The pattern to use to match the string argument value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5002 <param name="options">The options used to interpret the pattern.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5003 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5004 The following example shows how to expect a call to a method where the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5005 string argument matches the given regular expression, in a case insensitive way:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5006 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5007 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5008 .Setup("Check", ItExpr.IsRegex("[a-z]+", RegexOptions.IgnoreCase))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5009 .Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5010 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5011 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5012 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5013 <member name="T:Moq.Protected.ProtectedExtension">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5014 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5015 Enables the <c>Protected()</c> method on <see cref="T:Moq.Mock`1"/>,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5016 allowing setups to be set for protected members by using their
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5017 name as a string, rather than strong-typing them which is not possible
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5018 due to their visibility.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5019 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5020 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5021 <member name="M:Moq.Protected.ProtectedExtension.Protected``1(Moq.Mock{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5022 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5023 Enable protected setups for the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5024 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5025 <typeparam name="T">Mocked object type. Typically omitted as it can be inferred from the mock instance.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5026 <param name="mock">The mock to set the protected setups on.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5027 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5028 <member name="T:ThisAssembly">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5029 <group name="overview" title="Overview" order="0" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5030 <group name="setups" title="Specifying setups" order="1" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5031 <group name="returns" title="Returning values from members" order="2" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5032 <group name="verification" title="Verifying setups" order="3" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5033 <group name="advanced" title="Advanced scenarios" order="99" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5034 <group name="factory" title="Using MockFactory for consistency across mocks" order="4" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5035 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5036 <member name="T:Moq.Range">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5037 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5038 Kind of range to use in a filter specified through
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5039 <see cref="M:Moq.It.IsInRange``1(``0,``0,Moq.Range)"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5040 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5041 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5042 <member name="F:Moq.Range.Inclusive">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5043 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5044 The range includes the <c>to</c> and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5045 <c>from</c> values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5046 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5047 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5048 <member name="F:Moq.Range.Exclusive">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5049 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5050 The range does not include the <c>to</c> and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5051 <c>from</c> values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5052 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5053 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5054 <member name="T:Moq.DefaultValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5055 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5056 Determines the way default values are generated
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5057 calculated for loose mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5058 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5059 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5060 <member name="F:Moq.DefaultValue.Empty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5061 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5062 Default behavior, which generates empty values for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5063 value types (i.e. default(int)), empty array and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5064 enumerables, and nulls for all other reference types.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5065 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5066 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5067 <member name="F:Moq.DefaultValue.Mock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5068 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5069 Whenever the default value generated by <see cref="F:Moq.DefaultValue.Empty"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5070 is null, replaces this value with a mock (if the type
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5071 can be mocked).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5072 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5073 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5074 For sealed classes, a null value will be generated.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5075 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5076 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5077 <member name="T:Moq.Linq.MockQueryable`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5078 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5079 A default implementation of IQueryable for use with QueryProvider
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5080 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5081 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5082 <member name="M:Moq.Linq.MockQueryable`1.#ctor(System.Linq.Expressions.MethodCallExpression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5083 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5084 The <paramref name="underlyingCreateMocks"/> is a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5085 static method that returns an IQueryable of Mocks of T which is used to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5086 apply the linq specification to.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5087 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5088 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5089 <member name="T:Moq.Match">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5090 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5091 Allows creation custom value matchers that can be used on setups and verification,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5092 completely replacing the built-in <see cref="T:Moq.It"/> class with your own argument
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5093 matching rules.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5094 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5095 See also <see cref="T:Moq.Match`1"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5096 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5097 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5098 <member name="M:Moq.Match.Matcher``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5099 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5100 Provided for the sole purpose of rendering the delegate passed to the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5101 matcher constructor if no friendly render lambda is provided.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5102 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5103 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5104 <member name="M:Moq.Match.Create``1(System.Predicate{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5105 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5106 Initializes the match with the condition that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5107 will be checked in order to match invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5108 values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5109 </summary><param name="condition">The condition to match against actual values.</param><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5110 <seealso cref="T:Moq.Match`1"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5111 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5112 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5113 <member name="M:Moq.Match.Create``1(System.Predicate{``0},System.Linq.Expressions.Expression{System.Func{``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5114 <!-- No matching elements were found for the following include tag --><include file="Match.xdoc" path="docs/doc[@for=&quot;Match.Create{T}(condition,renderExpression&quot;]/*"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5115 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5116 <member name="M:Moq.Match.SetLastMatch``1(Moq.Match{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5117 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5118 This method is used to set an expression as the last matcher invoked,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5119 which is used in the SetupSet to allow matchers in the prop = value
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5120 delegate expression. This delegate is executed in "fluent" mode in
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5121 order to capture the value being set, and construct the corresponding
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5122 methodcall.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5123 This is also used in the MatcherFactory for each argument expression.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5124 This method ensures that when we execute the delegate, we
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5125 also track the matcher that was invoked, so that when we create the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5126 methodcall we build the expression using it, rather than the null/default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5127 value returned from the actual invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5128 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5129 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5130 <member name="T:Moq.Match`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5131 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5132 Allows creation custom value matchers that can be used on setups and verification,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5133 completely replacing the built-in <see cref="T:Moq.It"/> class with your own argument
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5134 matching rules.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5135 </summary><typeparam name="T">Type of the value to match.</typeparam><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5136 The argument matching is used to determine whether a concrete
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5137 invocation in the mock matches a given setup. This
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5138 matching mechanism is fully extensible.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5139 </remarks><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5140 Creating a custom matcher is straightforward. You just need to create a method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5141 that returns a value from a call to <see cref="M:Moq.Match.Create``1(System.Predicate{``0})"/> with
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5142 your matching condition and optional friendly render expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5143 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5144 [Matcher]
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5145 public Order IsBigOrder()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5146 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5147 return Match&lt;Order&gt;.Create(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5148 o =&gt; o.GrandTotal &gt;= 5000,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5149 /* a friendly expression to render on failures */
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5150 () =&gt; IsBigOrder());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5151 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5152 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5153 This method can be used in any mock setup invocation:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5154 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5155 mock.Setup(m =&gt; m.Submit(IsBigOrder()).Throws&lt;UnauthorizedAccessException&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5156 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5157 At runtime, Moq knows that the return value was a matcher (note that the method MUST be
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5158 annotated with the [Matcher] attribute in order to determine this) and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5159 evaluates your predicate with the actual value passed into your predicate.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5160 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5161 Another example might be a case where you want to match a lists of orders
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5162 that contains a particular one. You might create matcher like the following:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5163 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5164 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5165 public static class Orders
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5166 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5167 [Matcher]
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5168 public static IEnumerable&lt;Order&gt; Contains(Order order)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5169 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5170 return Match&lt;IEnumerable&lt;Order&gt;&gt;.Create(orders =&gt; orders.Contains(order));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5171 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5172 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5173 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5174 Now we can invoke this static method instead of an argument in an
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5175 invocation:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5176 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5177 var order = new Order { ... };
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5178 var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5179
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5180 mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5181 .Throws&lt;ArgumentException&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5182 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5183 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5184 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5185 <member name="T:Moq.FluentMockContext">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5186 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5187 Tracks the current mock and interception context.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5188 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5189 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5190 <member name="P:Moq.FluentMockContext.IsActive">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5191 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5192 Having an active fluent mock context means that the invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5193 is being performed in "trial" mode, just to gather the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5194 target method and arguments that need to be matched later
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5195 when the actual invocation is made.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5196 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5197 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5198 <member name="T:Moq.MockDefaultValueProvider">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5199 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5200 A <see cref="T:Moq.IDefaultValueProvider"/> that returns an empty default value
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5201 for non-mockeable types, and mocks for all other types (interfaces and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5202 non-sealed classes) that can be mocked.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5203 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5204 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5205 <member name="T:Moq.Mocks">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5206 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5207 Allows querying the universe of mocks for those that behave
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5208 according to the LINQ query specification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5209 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5210 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5211 This entry-point into Linq to Mocks is the only one in the root Moq
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5212 namespace to ease discovery. But to get all the mocking extension
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5213 methods on Object, a using of Moq.Linq must be done, so that the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5214 polluting of the intellisense for all objects is an explicit opt-in.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5215 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5216 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5217 <member name="M:Moq.Mocks.Of``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5218 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5219 Access the universe of mocks of the given type, to retrieve those
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5220 that behave according to the LINQ query specification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5221 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5222 <typeparam name="T">The type of the mocked object to query.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5223 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5224 <member name="M:Moq.Mocks.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5225 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5226 Access the universe of mocks of the given type, to retrieve those
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5227 that behave according to the LINQ query specification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5228 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5229 <param name="specification">The predicate with the setup expressions.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5230 <typeparam name="T">The type of the mocked object to query.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5231 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5232 <member name="M:Moq.Mocks.OneOf``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5233 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5234 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5235 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5236 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5237 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5238 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5239 <member name="M:Moq.Mocks.OneOf``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5240 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5241 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5242 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5243 <param name="specification">The predicate with the setup expressions.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5244 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5245 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5246 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5247 <member name="M:Moq.Mocks.CreateMockQuery``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5248 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5249 Creates the mock query with the underlying queriable implementation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5250 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5251 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5252 <member name="M:Moq.Mocks.CreateQueryable``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5253 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5254 Wraps the enumerator inside a queryable.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5255 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5256 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5257 <member name="M:Moq.Mocks.CreateMocks``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5258 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5259 Method that is turned into the actual call from .Query{T}, to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5260 transform the queryable query into a normal enumerable query.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5261 This method is never used directly by consumers.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5262 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5263 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5264 <member name="M:Moq.Mocks.SetPropery``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5265 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5266 Extension method used to support Linq-like setup properties that are not virtual but do have
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5267 a getter and a setter, thereby allowing the use of Linq to Mocks to quickly initialize Dtos too :)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5268 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5269 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5270 <member name="T:Moq.QueryableMockExtensions">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5271 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5272 Helper extensions that are used by the query translator.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5273 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5274 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5275 <member name="M:Moq.QueryableMockExtensions.FluentMock``2(Moq.Mock{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5276 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5277 Retrieves a fluent mock from the given setup expression.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5278 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5279 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5280 <member name="M:Moq.Proxy.IProxyFactory.GetDelegateProxyInterface(System.Type,System.Reflection.MethodInfo@)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5281 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5282 Gets an autogenerated interface with a method on it that matches the signature of the specified
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5283 <paramref name="delegateType"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5284 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5285 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5286 Such an interface can then be mocked, and a delegate pointed at the method on the mocked instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5287 This is how we support delegate mocking. The factory caches such interfaces and reuses them
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5288 for repeated requests for the same delegate type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5289 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5290 <param name="delegateType">The delegate type for which an interface is required.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5291 <param name="delegateInterfaceMethod">The method on the autogenerated interface.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5292 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5293 <member name="M:Moq.Proxy.CastleProxyFactory.CreateProxy(System.Type,Moq.Proxy.ICallInterceptor,System.Type[],System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5294 <inheritdoc />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5295 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5296 <member name="M:Moq.Proxy.CastleProxyFactory.GetDelegateProxyInterface(System.Type,System.Reflection.MethodInfo@)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5297 <inheritdoc />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5298 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5299 <member name="T:Moq.Times">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5300 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5301 Defines the number of invocations allowed by a mocked method.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5302 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5303 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5304 <member name="M:Moq.Times.AtLeast(System.Int32)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5305 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5306 Specifies that a mocked method should be invoked <paramref name="callCount"/> times as minimum.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5307 </summary><param name="callCount">The minimun number of times.</param><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5308 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5309 <member name="M:Moq.Times.AtLeastOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5310 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5311 Specifies that a mocked method should be invoked one time as minimum.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5312 </summary><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5313 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5314 <member name="M:Moq.Times.AtMost(System.Int32)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5315 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5316 Specifies that a mocked method should be invoked <paramref name="callCount"/> time as maximun.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5317 </summary><param name="callCount">The maximun number of times.</param><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5318 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5319 <member name="M:Moq.Times.AtMostOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5320 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5321 Specifies that a mocked method should be invoked one time as maximun.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5322 </summary><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5323 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5324 <member name="M:Moq.Times.Between(System.Int32,System.Int32,Moq.Range)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5325 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5326 Specifies that a mocked method should be invoked between <paramref name="callCountFrom"/> and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5327 <paramref name="callCountTo"/> times.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5328 </summary><param name="callCountFrom">The minimun number of times.</param><param name="callCountTo">The maximun number of times.</param><param name="rangeKind">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5329 The kind of range. See <see cref="T:Moq.Range"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5330 </param><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5331 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5332 <member name="M:Moq.Times.Exactly(System.Int32)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5333 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5334 Specifies that a mocked method should be invoked exactly <paramref name="callCount"/> times.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5335 </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>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5336 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5337 <member name="M:Moq.Times.Never">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5338 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5339 Specifies that a mocked method should not be invoked.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5340 </summary><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5341 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5342 <member name="M:Moq.Times.Once">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5343 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5344 Specifies that a mocked method should be invoked exactly one time.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5345 </summary><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5346 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5347 <member name="M:Moq.Times.Equals(System.Object)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5348 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5349 Determines whether the specified <see cref="T:System.Object"/> is equal to this instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5350 </summary><param name="obj">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5351 The <see cref="T:System.Object"/> to compare with this instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5352 </param><returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5353 <c>true</c> if the specified <see cref="T:System.Object"/> is equal to this instance; otherwise, <c>false</c>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5354 </returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5355 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5356 <member name="M:Moq.Times.GetHashCode">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5357 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5358 Returns a hash code for this instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5359 </summary><returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5360 A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5361 </returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5362 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5363 <member name="M:Moq.Times.op_Equality(Moq.Times,Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5364 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5365 Determines whether two specified <see cref="T:Moq.Times"/> objects have the same value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5366 </summary><param name="left">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5367 The first <see cref="T:Moq.Times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5368 </param><param name="right">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5369 The second <see cref="T:Moq.Times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5370 </param><returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5371 <c>true</c> if the value of left is the same as the value of right; otherwise, <c>false</c>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5372 </returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5373 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5374 <member name="M:Moq.Times.op_Inequality(Moq.Times,Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5375 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5376 Determines whether two specified <see cref="T:Moq.Times"/> objects have different values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5377 </summary><param name="left">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5378 The first <see cref="T:Moq.Times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5379 </param><param name="right">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5380 The second <see cref="T:Moq.Times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5381 </param><returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5382 <c>true</c> if the value of left is different from the value of right; otherwise, <c>false</c>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5383 </returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5384 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5385 </members>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5386 </doc>