annotate src/packages/Moq.4.1.1309.1617/lib/sl4/Moq.Silverlight.xml @ 2:b0419fdcff0b

Правка зависимостей
author Andre K <m407@mail.ru>
date Sat, 13 Dec 2014 18:14:19 +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.Silverlight</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.Mock`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
8 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
9 Provides a mock implementation of <typeparamref name="T"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
10 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
11 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
12 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
13 The behavior of the mock with regards to the setups and the actual calls is determined
5bca2d201ad8 initial commit
cin
parents:
diff changeset
14 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
15 constructor.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
16 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
17 </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
18 The following example shows establishing setups with specific values
5bca2d201ad8 initial commit
cin
parents:
diff changeset
19 for method invocations:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
20 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
21 // Arrange
5bca2d201ad8 initial commit
cin
parents:
diff changeset
22 var order = new Order(TALISKER, 50);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
23 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
24
5bca2d201ad8 initial commit
cin
parents:
diff changeset
25 mock.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
26
5bca2d201ad8 initial commit
cin
parents:
diff changeset
27 // Act
5bca2d201ad8 initial commit
cin
parents:
diff changeset
28 order.Fill(mock.Object);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
29
5bca2d201ad8 initial commit
cin
parents:
diff changeset
30 // Assert
5bca2d201ad8 initial commit
cin
parents:
diff changeset
31 Assert.True(order.IsFilled);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
32 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
33 The following example shows how to use the <see cref="T:Moq.It"/> class
5bca2d201ad8 initial commit
cin
parents:
diff changeset
34 to specify conditions for arguments instead of specific values:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
35 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
36 // Arrange
5bca2d201ad8 initial commit
cin
parents:
diff changeset
37 var order = new Order(TALISKER, 50);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
38 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
39
5bca2d201ad8 initial commit
cin
parents:
diff changeset
40 // shows how to expect a value within a range
5bca2d201ad8 initial commit
cin
parents:
diff changeset
41 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
42 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
43 It.IsInRange(0, 100, Range.Inclusive)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
44 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
45
5bca2d201ad8 initial commit
cin
parents:
diff changeset
46 // shows how to throw for unexpected calls.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
47 mock.Setup(x =&gt; x.Remove(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
48 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
49 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
50 .Throws(new InvalidOperationException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
51
5bca2d201ad8 initial commit
cin
parents:
diff changeset
52 // Act
5bca2d201ad8 initial commit
cin
parents:
diff changeset
53 order.Fill(mock.Object);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
54
5bca2d201ad8 initial commit
cin
parents:
diff changeset
55 // Assert
5bca2d201ad8 initial commit
cin
parents:
diff changeset
56 Assert.False(order.IsFilled);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
57 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
58 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
59 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
60 <member name="T:Moq.Mock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
61 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
62 Base class for mocks and static helper class with methods that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
63 apply to mocked objects, such as <see cref="M:Moq.Mock.Get``1(``0)"/> to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
64 retrieve a <see cref="T:Moq.Mock`1"/> from an object instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
65 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
66 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
67 <member name="T:Moq.IHideObjectMembers">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
68 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
69 Helper interface used to hide the base <see cref="T:System.Object"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
70 members from the fluent API to make it much cleaner
5bca2d201ad8 initial commit
cin
parents:
diff changeset
71 in Visual Studio intellisense.
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="M:Moq.IHideObjectMembers.GetType">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
75 <summary/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
76 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
77 <member name="M:Moq.IHideObjectMembers.GetHashCode">
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="M:Moq.IHideObjectMembers.ToString">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
81 <summary/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
82 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
83 <member name="M:Moq.IHideObjectMembers.Equals(System.Object)">
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.Mock.Of``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
87 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
88 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
89 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
90 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
91 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
92 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
93 <member name="M:Moq.Mock.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
94 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
95 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
96 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
97 <param name="predicate">The predicate with the specification of how the mocked object should behave.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
98 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
99 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
100 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
101 <member name="M:Moq.Mock.#ctor">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
102 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
103 Initializes a new instance of the <see cref="T:Moq.Mock"/> class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
104 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
105 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
106 <member name="M:Moq.Mock.Get``1(``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
107 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
108 Retrieves the mock object for the given object instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
109 </summary><typeparam name="T">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
110 Type of the mock to retrieve. Can be omitted as it's inferred
5bca2d201ad8 initial commit
cin
parents:
diff changeset
111 from the object instance passed in as the <paramref name="mocked"/> instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
112 </typeparam><param name="mocked">The instance of the mocked object.</param><returns>The mock associated with the mocked object.</returns><exception cref="T:System.ArgumentException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
113 The received <paramref name="mocked"/> instance
5bca2d201ad8 initial commit
cin
parents:
diff changeset
114 was not created by Moq.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
115 </exception><example group="advanced">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
116 The following example shows how to add a new setup to an object
5bca2d201ad8 initial commit
cin
parents:
diff changeset
117 instance which is not the original <see cref="T:Moq.Mock`1"/> but rather
5bca2d201ad8 initial commit
cin
parents:
diff changeset
118 the object associated with it:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
119 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
120 // Typed instance, not the mock, is retrieved from some test API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
121 HttpContextBase context = GetMockContext();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
122
5bca2d201ad8 initial commit
cin
parents:
diff changeset
123 // context.Request is the typed object from the "real" API
5bca2d201ad8 initial commit
cin
parents:
diff changeset
124 // so in order to add a setup to it, we need to get
5bca2d201ad8 initial commit
cin
parents:
diff changeset
125 // the mock that "owns" it
5bca2d201ad8 initial commit
cin
parents:
diff changeset
126 Mock&lt;HttpRequestBase&gt; request = Mock.Get(context.Request);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
127 mock.Setup(req =&gt; req.AppRelativeCurrentExecutionFilePath)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
128 .Returns(tempUrl);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
129 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
130 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
131 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
132 <member name="M:Moq.Mock.OnGetObject">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
133 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
134 Returns the mocked object value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
135 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
136 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
137 <member name="M:Moq.Mock.Verify">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
138 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
139 Verifies that all verifiable expectations have been met.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
140 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
141 This example sets up an expectation and marks it as verifiable. After
5bca2d201ad8 initial commit
cin
parents:
diff changeset
142 the mock is used, a <c>Verify()</c> call is issued on the mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
143 to ensure the method in the setup was invoked:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
144 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
145 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
146 this.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Verifiable().Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
147 ...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
148 // other test code
5bca2d201ad8 initial commit
cin
parents:
diff changeset
149 ...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
150 // Will throw if the test code has didn't call HasInventory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
151 this.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
152 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
153 </example><exception cref="T:Moq.MockException">Not all verifiable expectations were met.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
154 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
155 <member name="M:Moq.Mock.VerifyAll">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
156 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
157 Verifies all expectations regardless of whether they have
5bca2d201ad8 initial commit
cin
parents:
diff changeset
158 been flagged as verifiable.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
159 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
160 This example sets up an expectation without marking it as verifiable. After
5bca2d201ad8 initial commit
cin
parents:
diff changeset
161 the mock is used, a <see cref="M:Moq.Mock.VerifyAll"/> call is issued on the mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
162 to ensure that all expectations are met:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
163 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
164 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
165 this.Setup(x =&gt; x.HasInventory(TALISKER, 50)).Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
166 ...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
167 // other test code
5bca2d201ad8 initial commit
cin
parents:
diff changeset
168 ...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
169 // Will throw if the test code has didn't call HasInventory, even
5bca2d201ad8 initial commit
cin
parents:
diff changeset
170 // that expectation was not marked as verifiable.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
171 this.VerifyAll();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
172 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
173 </example><exception cref="T:Moq.MockException">At least one expectation was not met.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
174 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
175 <member name="M:Moq.Mock.GetInterceptor(System.Linq.Expressions.Expression,Moq.Mock)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
176 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
177 Gets the interceptor target for the given expression and root mock,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
178 building the intermediate hierarchy of mock objects if necessary.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
179 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
180 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
181 <member name="M:Moq.Mock.DoRaise(System.Reflection.EventInfo,System.EventArgs)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
182 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
183 Raises the associated event with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
184 event argument data.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
185 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
186 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
187 <member name="M:Moq.Mock.DoRaise(System.Reflection.EventInfo,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
188 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
189 Raises the associated event with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
190 event argument data.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
191 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
192 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
193 <member name="M:Moq.Mock.As``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
194 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
195 Adds an interface implementation to the mock,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
196 allowing setups to be specified for it.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
197 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
198 This method can only be called before the first use
5bca2d201ad8 initial commit
cin
parents:
diff changeset
199 of the mock <see cref="P:Moq.Mock.Object"/> property, at which
5bca2d201ad8 initial commit
cin
parents:
diff changeset
200 point the runtime type has already been generated
5bca2d201ad8 initial commit
cin
parents:
diff changeset
201 and no more interfaces can be added to it.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
202 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
203 Also, <typeparamref name="TInterface"/> must be an
5bca2d201ad8 initial commit
cin
parents:
diff changeset
204 interface and not a class, which must be specified
5bca2d201ad8 initial commit
cin
parents:
diff changeset
205 when creating the mock instead.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
206 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
207 </remarks><exception cref="T:System.InvalidOperationException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
208 The mock type
5bca2d201ad8 initial commit
cin
parents:
diff changeset
209 has already been generated by accessing the <see cref="P:Moq.Mock.Object"/> property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
210 </exception><exception cref="T:System.ArgumentException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
211 The <typeparamref name="TInterface"/> specified
5bca2d201ad8 initial commit
cin
parents:
diff changeset
212 is not an interface.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
213 </exception><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
214 The following example creates a mock for the main interface
5bca2d201ad8 initial commit
cin
parents:
diff changeset
215 and later adds <see cref="T:System.IDisposable"/> to it to verify
5bca2d201ad8 initial commit
cin
parents:
diff changeset
216 it's called by the consumer code:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
217 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
218 var mock = new Mock&lt;IProcessor&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
219 mock.Setup(x =&gt; x.Execute("ping"));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
220
5bca2d201ad8 initial commit
cin
parents:
diff changeset
221 // add IDisposable interface
5bca2d201ad8 initial commit
cin
parents:
diff changeset
222 var disposable = mock.As&lt;IDisposable&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
223 disposable.Setup(d =&gt; d.Dispose()).Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
224 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
225 </example><typeparam name="TInterface">Type of interface to cast the mock to.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
226 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
227 <member name="M:Moq.Mock.SetReturnsDefault``1(``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
228 <!-- 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
229 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
230 <member name="P:Moq.Mock.Behavior">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
231 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
232 Behavior of the mock, according to the value set in the constructor.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
233 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
234 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
235 <member name="P:Moq.Mock.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
236 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
237 Whether the base member virtual implementation will be called
5bca2d201ad8 initial commit
cin
parents:
diff changeset
238 for mocked classes if no setup is matched. Defaults to <see langword="false"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
239 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
240 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
241 <member name="P:Moq.Mock.DefaultValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
242 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
243 Specifies the behavior to use when returning default values for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
244 unexpected invocations on loose mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
245 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
246 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
247 <member name="P:Moq.Mock.Object">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
248 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
249 Gets the mocked object instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
250 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
251 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
252 <member name="P:Moq.Mock.MockedType">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
253 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
254 Retrieves the type of the mocked object, its generic type argument.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
255 This is used in the auto-mocking of hierarchy access.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
256 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
257 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
258 <member name="P:Moq.Mock.DelegateInterfaceMethod">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
259 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
260 If this is a mock of a delegate, this property contains the method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
261 on the autogenerated interface so that we can convert setup + verify
5bca2d201ad8 initial commit
cin
parents:
diff changeset
262 expressions on the delegate into expressions on the interface proxy.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
263 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
264 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
265 <member name="P:Moq.Mock.IsDelegateMock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
266 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
267 Allows to check whether expression conversion to the <see cref="P:Moq.Mock.DelegateInterfaceMethod"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
268 must be performed on the mock, without causing unnecessarily early initialization of
5bca2d201ad8 initial commit
cin
parents:
diff changeset
269 the mock instance, which breaks As{T}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
270 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
271 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
272 <member name="P:Moq.Mock.DefaultValueProvider">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
273 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
274 Specifies the class that will determine the default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
275 value to return when invocations are made that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
276 have no setups and need to return a default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
277 value (for loose mocks).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
278 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
279 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
280 <member name="P:Moq.Mock.ImplementedInterfaces">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
281 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
282 Exposes the list of extra interfaces implemented by the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
283 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
284 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
285 <member name="T:Moq.IMock`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
286 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
287 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
288 are possible. Only covers the covariant members of Mock&lt;T&gt;.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
289 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
290 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
291 <member name="P:Moq.IMock`1.Object">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
292 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
293 Exposes the mocked object instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
294 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
295 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
296 <member name="P:Moq.IMock`1.Behavior">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
297 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
298 Behavior of the mock, according to the value set in the constructor.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
299 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
300 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
301 <member name="P:Moq.IMock`1.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
302 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
303 Whether the base member virtual implementation will be called
5bca2d201ad8 initial commit
cin
parents:
diff changeset
304 for mocked classes if no setup is matched. Defaults to <see langword="false"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
305 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
306 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
307 <member name="P:Moq.IMock`1.DefaultValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
308 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
309 Specifies the behavior to use when returning default values for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
310 unexpected invocations on loose mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
311 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
312 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
313 <member name="M:Moq.Mock`1.#ctor(System.Boolean)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
314 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
315 Ctor invoked by AsTInterface exclusively.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
316 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
317 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
318 <member name="M:Moq.Mock`1.#ctor">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
319 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
320 Initializes an instance of the mock with <see cref="F:Moq.MockBehavior.Default">default behavior</see>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
321 </summary><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
322 <code>var mock = new Mock&lt;IFormatProvider&gt;();</code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
323 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
324 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
325 <member name="M:Moq.Mock`1.#ctor(System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
326 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
327 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
328 the given constructor arguments for the class. (Only valid when <typeparamref name="T"/> is a class)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
329 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
330 The mock will try to find the best match constructor given the constructor arguments, and invoke that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
331 to initialize the instance. This applies only for classes, not interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
332 </remarks><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
333 <code>var mock = new Mock&lt;MyProvider&gt;(someArgument, 25);</code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
334 </example><param name="args">Optional constructor arguments if the mocked type is a class.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
335 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
336 <member name="M:Moq.Mock`1.#ctor(Moq.MockBehavior)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
337 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
338 Initializes an instance of the mock with the specified <see cref="T:Moq.MockBehavior">behavior</see>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
339 </summary><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
340 <code>var mock = new Mock&lt;IFormatProvider&gt;(MockBehavior.Relaxed);</code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
341 </example><param name="behavior">Behavior of the mock.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
342 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
343 <member name="M:Moq.Mock`1.#ctor(Moq.MockBehavior,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
344 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
345 Initializes an instance of the mock with a specific <see cref="T:Moq.MockBehavior">behavior</see> with
5bca2d201ad8 initial commit
cin
parents:
diff changeset
346 the given constructor arguments for the class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
347 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
348 The mock will try to find the best match constructor given the constructor arguments, and invoke that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
349 to initialize the instance. This applies only to classes, not interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
350 </remarks><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
351 <code>var mock = new Mock&lt;MyProvider&gt;(someArgument, 25);</code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
352 </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
353 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
354 <member name="M:Moq.Mock`1.OnGetObject">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
355 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
356 Returns the mocked object value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
357 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
358 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
359 <member name="M:Moq.Mock`1.Setup(System.Linq.Expressions.Expression{System.Action{`0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
360 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
361 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
362 to a void method.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
363 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
364 If more than one setup is specified for the same method or property,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
365 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
366 </remarks><param name="expression">Lambda expression that specifies the expected method invocation.</param><example group="setups">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
367 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
368 var mock = new Mock&lt;IProcessor&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
369 mock.Setup(x =&gt; x.Execute("ping"));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
370 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
371 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
372 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
373 <member name="M:Moq.Mock`1.Setup``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
374 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
375 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
376 to a value returning method.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
377 </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
378 If more than one setup is specified for the same method or property,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
379 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
380 </remarks><param name="expression">Lambda expression that specifies the method invocation.</param><example group="setups">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
381 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
382 mock.Setup(x =&gt; x.HasInventory("Talisker", 50)).Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
383 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
384 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
385 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
386 <member name="M:Moq.Mock`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
387 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
388 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
389 to a property getter.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
390 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
391 If more than one setup is set for the same property getter,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
392 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
393 </remarks><typeparam name="TProperty">Type of the property. Typically omitted as it can be inferred from the expression.</typeparam><param name="expression">Lambda expression that specifies the property getter.</param><example group="setups">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
394 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
395 mock.SetupGet(x =&gt; x.Suspended)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
396 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
397 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
398 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
399 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
400 <member name="M:Moq.Mock`1.SetupSet``1(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
401 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
402 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
403 to a property setter.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
404 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
405 If more than one setup is set for the same property setter,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
406 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
407 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
408 This overloads allows the use of a callback already
5bca2d201ad8 initial commit
cin
parents:
diff changeset
409 typed for the property type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
410 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
411 </remarks><typeparam name="TProperty">Type of the property. Typically omitted as it can be inferred from the expression.</typeparam><param name="setterExpression">The Lambda expression that sets a property to a value.</param><example group="setups">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
412 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
413 mock.SetupSet(x =&gt; x.Suspended = true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
414 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
415 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
416 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
417 <member name="M:Moq.Mock`1.SetupSet(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
418 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
419 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
420 to a property setter.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
421 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
422 If more than one setup is set for the same property setter,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
423 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
424 </remarks><param name="setterExpression">Lambda expression that sets a property to a value.</param><example group="setups">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
425 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
426 mock.SetupSet(x =&gt; x.Suspended = true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
427 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
428 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
429 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
430 <member name="M:Moq.Mock`1.SetupProperty``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
431 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
432 Specifies that the given property should have "property behavior",
5bca2d201ad8 initial commit
cin
parents:
diff changeset
433 meaning that setting its value will cause it to be saved and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
434 later returned when the property is requested. (this is also
5bca2d201ad8 initial commit
cin
parents:
diff changeset
435 known as "stubbing").
5bca2d201ad8 initial commit
cin
parents:
diff changeset
436 </summary><typeparam name="TProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
437 Type of the property, inferred from the property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
438 expression (does not need to be specified).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
439 </typeparam><param name="property">Property expression to stub.</param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
440 If you have an interface with an int property <c>Value</c>, you might
5bca2d201ad8 initial commit
cin
parents:
diff changeset
441 stub it using the following straightforward call:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
442 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
443 var mock = new Mock&lt;IHaveValue&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
444 mock.Stub(v =&gt; v.Value);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
445 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
446 After the <c>Stub</c> call has been issued, setting and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
447 retrieving the object value will behave as expected:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
448 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
449 IHaveValue v = mock.Object;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
450
5bca2d201ad8 initial commit
cin
parents:
diff changeset
451 v.Value = 5;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
452 Assert.Equal(5, v.Value);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
453 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
454 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
455 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
456 <member name="M:Moq.Mock`1.SetupProperty``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
457 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
458 Specifies that the given property should have "property behavior",
5bca2d201ad8 initial commit
cin
parents:
diff changeset
459 meaning that setting its value will cause it to be saved and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
460 later returned when the property is requested. This overload
5bca2d201ad8 initial commit
cin
parents:
diff changeset
461 allows setting the initial value for the property. (this is also
5bca2d201ad8 initial commit
cin
parents:
diff changeset
462 known as "stubbing").
5bca2d201ad8 initial commit
cin
parents:
diff changeset
463 </summary><typeparam name="TProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
464 Type of the property, inferred from the property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
465 expression (does not need to be specified).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
466 </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
467 If you have an interface with an int property <c>Value</c>, you might
5bca2d201ad8 initial commit
cin
parents:
diff changeset
468 stub it using the following straightforward call:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
469 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
470 var mock = new Mock&lt;IHaveValue&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
471 mock.SetupProperty(v =&gt; v.Value, 5);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
472 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
473 After the <c>SetupProperty</c> call has been issued, setting and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
474 retrieving the object value will behave as expected:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
475 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
476 IHaveValue v = mock.Object;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
477 // Initial value was stored
5bca2d201ad8 initial commit
cin
parents:
diff changeset
478 Assert.Equal(5, v.Value);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
479
5bca2d201ad8 initial commit
cin
parents:
diff changeset
480 // New value set which changes the initial value
5bca2d201ad8 initial commit
cin
parents:
diff changeset
481 v.Value = 6;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
482 Assert.Equal(6, v.Value);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
483 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
484 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
485 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
486 <member name="M:Moq.Mock`1.SetupAllProperties">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
487 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
488 Specifies that the all properties on the mock should have "property behavior",
5bca2d201ad8 initial commit
cin
parents:
diff changeset
489 meaning that setting its value will cause it to be saved and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
490 later returned when the property is requested. (this is also
5bca2d201ad8 initial commit
cin
parents:
diff changeset
491 known as "stubbing"). The default value for each property will be the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
492 one generated as specified by the <see cref="P:Moq.Mock.DefaultValue"/> property for the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
493 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
494 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
495 the mocked default values will also get all properties setup recursively.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
496 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
497 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
498 <member name="M:Moq.Mock`1.When(System.Func{System.Boolean})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
499 <!-- 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
500 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
501 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
502 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
503 Verifies that a specific invocation matching the given expression was performed on the mock. Use
5bca2d201ad8 initial commit
cin
parents:
diff changeset
504 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
505 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
506 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
507 invocation with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
508 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
509 var mock = new Mock&lt;IProcessor&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
510 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
511 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
512 // Will throw if the test code didn't call Execute with a "ping" string argument.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
513 mock.Verify(proc =&gt; proc.Execute("ping"));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
514 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
515 </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
516 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
517 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
518 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
519 Verifies that a specific invocation matching the given expression was performed on the mock. Use
5bca2d201ad8 initial commit
cin
parents:
diff changeset
520 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
521 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
522 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
523 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
524 </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
525 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
526 <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
527 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
528 Verifies that a specific invocation matching the given expression was performed on the mock. Use
5bca2d201ad8 initial commit
cin
parents:
diff changeset
529 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
530 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
531 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
532 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
533 </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
534 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
535 <member name="M:Moq.Mock`1.Verify(System.Linq.Expressions.Expression{System.Action{`0}},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
536 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
537 Verifies that a specific invocation matching the given expression was performed on the mock,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
538 specifying a failure error message. Use in conjuntion with the default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
539 <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
540 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
541 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
542 invocation with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
543 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
544 var mock = new Mock&lt;IProcessor&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
545 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
546 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
547 // Will throw if the test code didn't call Execute with a "ping" string argument.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
548 mock.Verify(proc =&gt; proc.Execute("ping"));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
549 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
550 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
551 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
552 <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
553 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
554 Verifies that a specific invocation matching the given expression was performed on the mock,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
555 specifying a failure error message. Use in conjuntion with the default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
556 <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
557 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
558 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
559 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
560 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><param name="failMessage">Message to show if verification fails.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
561 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
562 <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
563 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
564 Verifies that a specific invocation matching the given expression was performed on the mock,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
565 specifying a failure error message. Use in conjuntion with the default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
566 <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
567 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
568 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
569 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
570 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><param name="failMessage">Message to show if verification fails.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
571 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
572 <member name="M:Moq.Mock`1.Verify``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
573 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
574 Verifies that a specific invocation matching the given expression was performed on the mock. Use
5bca2d201ad8 initial commit
cin
parents:
diff changeset
575 in conjuntion with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
576 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
577 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
578 invocation with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
579 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
580 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
581 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
582 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
583 // Will throw if the test code didn't call HasInventory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
584 mock.Verify(warehouse =&gt; warehouse.HasInventory(TALISKER, 50));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
585 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
586 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><typeparam name="TResult">Type of return value from the expression.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
587 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
588 <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
589 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
590 Verifies that a specific invocation matching the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
591 expression was performed on the mock. Use in conjuntion
5bca2d201ad8 initial commit
cin
parents:
diff changeset
592 with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
593 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
594 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
595 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
596 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><typeparam name="TResult">Type of return value from the expression.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
597 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
598 <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
599 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
600 Verifies that a specific invocation matching the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
601 expression was performed on the mock. Use in conjuntion
5bca2d201ad8 initial commit
cin
parents:
diff changeset
602 with the default <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
603 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
604 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
605 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
606 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><typeparam name="TResult">Type of return value from the expression.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
607 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
608 <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
609 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
610 Verifies that a specific invocation matching the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
611 expression was performed on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
612 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
613 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
614 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
615 and later we want to verify that a given invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
616 with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
617 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
618 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
619 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
620 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
621 // Will throw if the test code didn't call HasInventory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
622 mock.Verify(warehouse =&gt; warehouse.HasInventory(TALISKER, 50), "When filling orders, inventory has to be checked");
5bca2d201ad8 initial commit
cin
parents:
diff changeset
623 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
624 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TResult">Type of return value from the expression.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
625 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
626 <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
627 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
628 Verifies that a specific invocation matching the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
629 expression was performed on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
630 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
631 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
632 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
633 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
634 </exception><param name="expression">Expression to verify.</param><param name="times">The number of times a method is allowed to be called.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TResult">Type of return value from the expression.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
635 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
636 <member name="M:Moq.Mock`1.VerifyGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
637 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
638 Verifies that a property was read on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
639 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
640 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
641 and later we want to verify that a given property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
642 was retrieved from it:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
643 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
644 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
645 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
646 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
647 // Will throw if the test code didn't retrieve the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
648 mock.VerifyGet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
649 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
650 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><typeparam name="TProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
651 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
652 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
653 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
654 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
655 <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
656 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
657 Verifies that a property was read on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
658 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
659 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
660 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
661 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="expression">Expression to verify.</param><typeparam name="TProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
662 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
663 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
664 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
665 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
666 <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
667 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
668 Verifies that a property was read on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
669 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
670 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
671 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
672 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="expression">Expression to verify.</param><typeparam name="TProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
673 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
674 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
675 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
676 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
677 <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
678 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
679 Verifies that a property was read on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
680 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
681 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
682 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
683 and later we want to verify that a given property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
684 was retrieved from it:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
685 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
686 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
687 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
688 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
689 // Will throw if the test code didn't retrieve the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
690 mock.VerifyGet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
691 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
692 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
693 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
694 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
695 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
696 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
697 <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
698 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
699 Verifies that a property was read on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
700 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
701 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
702 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
703 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
704 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
705 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
706 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
707 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
708 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
709 <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
710 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
711 Verifies that a property was read on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
712 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
713 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
714 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
715 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
716 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="expression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param><typeparam name="TProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
717 Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
718 be inferred from the expression's return type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
719 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
720 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
721 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
722 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
723 Verifies that a property was set on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
724 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
725 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
726 and later we want to verify that a given property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
727 was set on it:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
728 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
729 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
730 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
731 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
732 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
733 mock.VerifySet(warehouse =&gt; warehouse.IsClosed = true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
734 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
735 </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
736 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
737 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
738 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
739 Verifies that a property was set on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
740 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
741 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
742 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
743 </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
744 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
745 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},System.Func{Moq.Times})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
746 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
747 Verifies that a property was set on the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
748 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
749 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
750 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
751 </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
752 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
753 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
754 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
755 Verifies that a property was set on the mock, specifying
5bca2d201ad8 initial commit
cin
parents:
diff changeset
756 a failure message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
757 </summary><example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
758 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
759 and later we want to verify that a given property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
760 was set on it:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
761 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
762 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
763 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
764 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
765 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
766 mock.VerifySet(warehouse =&gt; warehouse.IsClosed = true, "Warehouse should always be closed after the action");
5bca2d201ad8 initial commit
cin
parents:
diff changeset
767 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
768 </example><exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception><param name="setterExpression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
769 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
770 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},Moq.Times,System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
771 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
772 Verifies that a property was set on the mock, specifying
5bca2d201ad8 initial commit
cin
parents:
diff changeset
773 a failure message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
774 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
775 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
776 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
777 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="setterExpression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
778 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
779 <member name="M:Moq.Mock`1.VerifySet(System.Action{`0},System.Func{Moq.Times},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
780 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
781 Verifies that a property was set on the mock, specifying
5bca2d201ad8 initial commit
cin
parents:
diff changeset
782 a failure message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
783 </summary><exception cref="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
784 The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
785 <paramref name="times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
786 </exception><param name="times">The number of times a method is allowed to be called.</param><param name="setterExpression">Expression to verify.</param><param name="failMessage">Message to show if verification fails.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
787 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
788 <member name="M:Moq.Mock`1.Raise(System.Action{`0},System.EventArgs)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
789 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
790 Raises the event referenced in <paramref name="eventExpression"/> using
5bca2d201ad8 initial commit
cin
parents:
diff changeset
791 the given <paramref name="args"/> argument.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
792 </summary><exception cref="T:System.ArgumentException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
793 The <paramref name="args"/> argument is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
794 invalid for the target event invocation, or the <paramref name="eventExpression"/> is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
795 not an event attach or detach expression.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
796 </exception><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
797 The following example shows how to raise a <see cref="E:System.ComponentModel.INotifyPropertyChanged.PropertyChanged"/> event:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
798 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
799 var mock = new Mock&lt;IViewModel&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
800
5bca2d201ad8 initial commit
cin
parents:
diff changeset
801 mock.Raise(x =&gt; x.PropertyChanged -= null, new PropertyChangedEventArgs("Name"));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
802 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
803 </example><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
804 This example shows how to invoke an event with a custom event arguments
5bca2d201ad8 initial commit
cin
parents:
diff changeset
805 class in a view that will cause its corresponding presenter to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
806 react by changing its state:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
807 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
808 var mockView = new Mock&lt;IOrdersView&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
809 var presenter = new OrdersPresenter(mockView.Object);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
810
5bca2d201ad8 initial commit
cin
parents:
diff changeset
811 // Check that the presenter has no selection by default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
812 Assert.Null(presenter.SelectedOrder);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
813
5bca2d201ad8 initial commit
cin
parents:
diff changeset
814 // Raise the event with a specific arguments data
5bca2d201ad8 initial commit
cin
parents:
diff changeset
815 mockView.Raise(v =&gt; v.SelectionChanged += null, new OrderEventArgs { Order = new Order("moq", 500) });
5bca2d201ad8 initial commit
cin
parents:
diff changeset
816
5bca2d201ad8 initial commit
cin
parents:
diff changeset
817 // Now the presenter reacted to the event, and we have a selected order
5bca2d201ad8 initial commit
cin
parents:
diff changeset
818 Assert.NotNull(presenter.SelectedOrder);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
819 Assert.Equal("moq", presenter.SelectedOrder.ProductName);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
820 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
821 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
822 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
823 <member name="M:Moq.Mock`1.Raise(System.Action{`0},System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
824 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
825 Raises the event referenced in <paramref name="eventExpression"/> using
5bca2d201ad8 initial commit
cin
parents:
diff changeset
826 the given <paramref name="args"/> argument for a non-EventHandler typed event.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
827 </summary><exception cref="T:System.ArgumentException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
828 The <paramref name="args"/> arguments are
5bca2d201ad8 initial commit
cin
parents:
diff changeset
829 invalid for the target event invocation, or the <paramref name="eventExpression"/> is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
830 not an event attach or detach expression.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
831 </exception><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
832 The following example shows how to raise a custom event that does not adhere to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
833 the standard <c>EventHandler</c>:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
834 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
835 var mock = new Mock&lt;IViewModel&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
836
5bca2d201ad8 initial commit
cin
parents:
diff changeset
837 mock.Raise(x =&gt; x.MyEvent -= null, "Name", bool, 25);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
838 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
839 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
840 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
841 <member name="M:Moq.Mock`1.Expect(System.Linq.Expressions.Expression{System.Action{`0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
842 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
843 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
844 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
845 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
846 <member name="M:Moq.Mock`1.Expect``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
847 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
848 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
849 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
850 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
851 <member name="M:Moq.Mock`1.ExpectGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
852 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
853 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
854 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
855 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
856 <member name="M:Moq.Mock`1.ExpectSet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
857 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
858 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
859 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
860 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
861 <member name="M:Moq.Mock`1.ExpectSet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}},``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
862 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
863 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
864 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
865 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
866 <member name="P:Moq.Mock`1.Object">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
867 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
868 Exposes the mocked object instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
869 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
870 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
871 <member name="P:Moq.Mock`1.DelegateInterfaceMethod">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
872 <inheritdoc />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
873 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
874 <member name="T:Moq.Language.ISetupConditionResult`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
875 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
876 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
877 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
878 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
879 <member name="M:Moq.Language.ISetupConditionResult`1.Setup(System.Linq.Expressions.Expression{System.Action{`0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
880 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
881 The expectation will be considered only in the former condition.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
882 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
883 <param name="expression"></param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
884 <returns></returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
885 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
886 <member name="M:Moq.Language.ISetupConditionResult`1.Setup``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
887 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
888 The expectation will be considered only in the former condition.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
889 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
890 <typeparam name="TResult"></typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
891 <param name="expression"></param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
892 <returns></returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
893 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
894 <member name="M:Moq.Language.ISetupConditionResult`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
895 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
896 Setups the get.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
897 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
898 <typeparam name="TProperty">The type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
899 <param name="expression">The expression.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
900 <returns></returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
901 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
902 <member name="M:Moq.Language.ISetupConditionResult`1.SetupSet``1(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
903 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
904 Setups the set.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
905 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
906 <typeparam name="TProperty">The type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
907 <param name="setterExpression">The setter expression.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
908 <returns></returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
909 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
910 <member name="M:Moq.Language.ISetupConditionResult`1.SetupSet(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
911 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
912 Setups the set.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
913 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
914 <param name="setterExpression">The setter expression.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
915 <returns></returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
916 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
917 <member name="T:Moq.DefaultValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
918 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
919 Determines the way default values are generated
5bca2d201ad8 initial commit
cin
parents:
diff changeset
920 calculated for loose mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
921 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
922 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
923 <member name="F:Moq.DefaultValue.Empty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
924 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
925 Default behavior, which generates empty values for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
926 value types (i.e. default(int)), empty array and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
927 enumerables, and nulls for all other reference types.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
928 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
929 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
930 <member name="F:Moq.DefaultValue.Mock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
931 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
932 Whenever the default value generated by <see cref="F:Moq.DefaultValue.Empty"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
933 is null, replaces this value with a mock (if the type
5bca2d201ad8 initial commit
cin
parents:
diff changeset
934 can be mocked).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
935 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
936 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
937 For sealed classes, a null value will be generated.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
938 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
939 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
940 <member name="T:Moq.EmptyDefaultValueProvider">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
941 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
942 A <see cref="T:Moq.IDefaultValueProvider"/> that returns an empty default value
5bca2d201ad8 initial commit
cin
parents:
diff changeset
943 for invocations that do not have setups or return values, with loose mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
944 This is the default behavior for a mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
945 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
946 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
947 <member name="T:Moq.IDefaultValueProvider">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
948 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
949 Interface to be implemented by classes that determine the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
950 default value of non-expected invocations.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
951 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
952 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
953 <member name="M:Moq.IDefaultValueProvider.DefineDefault``1(``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
954 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
955 Defines the default value to return in all the methods returning <typeparamref name="T"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
956 </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
957 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
958 <member name="M:Moq.IDefaultValueProvider.ProvideDefault(System.Reflection.MethodInfo)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
959 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
960 Provides a value for the given member and arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
961 </summary><param name="member">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
962 The member to provide a default value for.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
963 </param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
964 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
965 <member name="T:Moq.Evaluator">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
966 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
967 Provides partial evaluation of subtrees, whenever they can be evaluated locally.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
968 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
969 <author>Matt Warren: http://blogs.msdn.com/mattwar</author>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
970 <contributor>Documented by InSTEDD: http://www.instedd.org</contributor>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
971 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
972 <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
973 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
974 Performs evaluation and replacement of independent sub-trees
5bca2d201ad8 initial commit
cin
parents:
diff changeset
975 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
976 <param name="expression">The root of the expression tree.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
977 <param name="fnCanBeEvaluated">A function that decides whether a given expression
5bca2d201ad8 initial commit
cin
parents:
diff changeset
978 node can be part of the local function.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
979 <returns>A new tree with sub-trees evaluated and replaced.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
980 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
981 <member name="M:Moq.Evaluator.PartialEval(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
982 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
983 Performs evaluation and replacement of independent sub-trees
5bca2d201ad8 initial commit
cin
parents:
diff changeset
984 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
985 <param name="expression">The root of the expression tree.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
986 <returns>A new tree with sub-trees evaluated and replaced.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
987 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
988 <member name="T:Moq.Evaluator.SubtreeEvaluator">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
989 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
990 Evaluates and replaces sub-trees when first candidate is reached (top-down)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
991 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
992 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
993 <member name="T:Moq.Evaluator.Nominator">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
994 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
995 Performs bottom-up analysis to determine which nodes can possibly
5bca2d201ad8 initial commit
cin
parents:
diff changeset
996 be part of an evaluated sub-tree.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
997 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
998 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
999 <member name="M:Moq.ExpressionExtensions.ToLambda(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1000 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1001 Casts the expression to a lambda expression, removing
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1002 a cast if there's any.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1003 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1004 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1005 <member name="M:Moq.ExpressionExtensions.ToMethodCall(System.Linq.Expressions.LambdaExpression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1006 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1007 Casts the body of the lambda expression to a <see cref="T:System.Linq.Expressions.MethodCallExpression"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1008 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1009 <exception cref="T:System.ArgumentException">If the body is not a method call.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1010 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1011 <member name="M:Moq.ExpressionExtensions.ToPropertyInfo(System.Linq.Expressions.LambdaExpression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1012 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1013 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
1014 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1015 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1016 <member name="M:Moq.ExpressionExtensions.IsProperty(System.Linq.Expressions.LambdaExpression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1017 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1018 Checks whether the body of the lambda expression is a property access.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1019 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1020 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1021 <member name="M:Moq.ExpressionExtensions.IsProperty(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1022 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1023 Checks whether the expression is a property access.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1024 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1025 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1026 <member name="M:Moq.ExpressionExtensions.IsPropertyIndexer(System.Linq.Expressions.LambdaExpression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1027 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1028 Checks whether the body of the lambda expression is a property indexer, which is true
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1029 when the expression is an <see cref="T:System.Linq.Expressions.MethodCallExpression"/> whose
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1030 <see cref="P:System.Linq.Expressions.MethodCallExpression.Method"/> has <see cref="P:System.Reflection.MethodBase.IsSpecialName"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1031 equal to <see langword="true"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1032 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1033 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1034 <member name="M:Moq.ExpressionExtensions.IsPropertyIndexer(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1035 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1036 Checks whether the expression is a property indexer, which is true
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1037 when the expression is an <see cref="T:System.Linq.Expressions.MethodCallExpression"/> whose
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1038 <see cref="P:System.Linq.Expressions.MethodCallExpression.Method"/> has <see cref="P:System.Reflection.MethodBase.IsSpecialName"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1039 equal to <see langword="true"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1040 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1041 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1042 <member name="M:Moq.ExpressionExtensions.CastTo``1(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1043 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1044 Creates an expression that casts the given expression to the <typeparamref name="T"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1045 type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1046 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1047 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1048 <member name="M:Moq.ExpressionExtensions.ToStringFixed(System.Linq.Expressions.Expression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1049 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1050 TODO: remove this code when https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=331583
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1051 is fixed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1052 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1053 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1054 <member name="M:Moq.ExpressionExtensions.GetCallInfo(System.Linq.Expressions.LambdaExpression,Moq.Mock)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1055 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1056 Extracts, into a common form, information from a <see cref="T:System.Linq.Expressions.LambdaExpression"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1057 around either a <see cref="T:System.Linq.Expressions.MethodCallExpression"/> (for a normal method call)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1058 or a <see cref="T:System.Linq.Expressions.InvocationExpression"/> (for a delegate invocation).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1059 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1060 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1061 <member name="T:Moq.ExpressionStringBuilder">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1062 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1063 The intention of <see cref="T:Moq.ExpressionStringBuilder"/> is to create a more readable
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1064 string representation for the failure message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1065 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1066 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1067 <member name="M:Moq.Extensions.IsDelegate(System.Type)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1068 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1069 Tests if a type is a delegate type (subclasses <see cref="T:System.Delegate"/>).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1070 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1071 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1072 <member name="T:Moq.FluentMockContext">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1073 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1074 Tracks the current mock and interception context.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1075 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1076 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1077 <member name="P:Moq.FluentMockContext.IsActive">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1078 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1079 Having an active fluent mock context means that the invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1080 is being performed in "trial" mode, just to gather the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1081 target method and arguments that need to be matched later
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1082 when the actual invocation is made.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1083 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1084 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1085 <member name="M:Moq.Guard.NotNull``1(System.Linq.Expressions.Expression{System.Func{``0}},``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1086 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1087 Ensures the given <paramref name="value"/> is not null.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1088 Throws <see cref="T:System.ArgumentNullException"/> otherwise.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1089 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1090 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1091 <member name="M:Moq.Guard.NotNullOrEmpty(System.Linq.Expressions.Expression{System.Func{System.String}},System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1092 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1093 Ensures the given string <paramref name="value"/> is not null or empty.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1094 Throws <see cref="T:System.ArgumentNullException"/> in the first case, or
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1095 <see cref="T:System.ArgumentException"/> in the latter.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1096 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1097 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1098 <member name="M:Moq.Guard.NotOutOfRangeInclusive``1(System.Linq.Expressions.Expression{System.Func{``0}},``0,``0,``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1099 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1100 Checks an argument to ensure it is in the specified range including the edges.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1101 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1102 <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
1103 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1104 <param name="reference">The expression containing the name of the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1105 <param name="value">The argument value to check.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1106 <param name="from">The minimun allowed value for the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1107 <param name="to">The maximun allowed value for the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1108 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1109 <member name="M:Moq.Guard.NotOutOfRangeExclusive``1(System.Linq.Expressions.Expression{System.Func{``0}},``0,``0,``0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1110 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1111 Checks an argument to ensure it is in the specified range excluding the edges.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1112 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1113 <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
1114 </typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1115 <param name="reference">The expression containing the name of the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1116 <param name="value">The argument value to check.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1117 <param name="from">The minimun allowed value for the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1118 <param name="to">The maximun allowed value for the argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1119 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1120 <member name="M:Moq.IInterceptStrategy.HandleIntercept(Moq.Proxy.ICallContext,Moq.InterceptStrategyContext)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1121 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1122 Handle interception
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1123 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1124 <param name="invocation">the current invocation context</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1125 <param name="ctx">shared data among the strategies during an interception</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1126 <returns>true if further interception has to be processed, otherwise false</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1127 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1128 <member name="T:Moq.IMocked`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1129 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1130 Implemented by all generated mock object instances.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1131 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1132 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1133 <member name="T:Moq.IMocked">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1134 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1135 Implemented by all generated mock object instances.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1136 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1137 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1138 <member name="P:Moq.IMocked.Mock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1139 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1140 Reference the Mock that contains this as the <c>mock.Object</c> value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1141 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1142 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1143 <member name="P:Moq.IMocked`1.Mock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1144 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1145 Reference the Mock that contains this as the <c>mock.Object</c> value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1146 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1147 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1148 <member name="T:Moq.Interceptor">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1149 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1150 Implements the actual interception and method invocation for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1151 all mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1152 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1153 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1154 <member name="M:Moq.AddActualInvocation.GetEventFromName(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1155 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1156 Get an eventInfo for a given event name. Search type ancestors depth first if necessary.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1157 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1158 <param name="eventName">Name of the event, with the set_ or get_ prefix already removed</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1159 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1160 <member name="M:Moq.AddActualInvocation.GetNonPublicEventFromName(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1161 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1162 Get an eventInfo for a given event name. Search type ancestors depth first if necessary.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1163 Searches also in non public events.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1164 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1165 <param name="eventName">Name of the event, with the set_ or get_ prefix already removed</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1166 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1167 <member name="M:Moq.AddActualInvocation.GetAncestorTypes(System.Type)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1168 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1169 Given a type return all of its ancestors, both types and interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1170 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1171 <param name="initialType">The type to find immediate ancestors of</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1172 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1173 <member name="T:Moq.It">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1174 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1175 Allows the specification of a matching condition for an
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1176 argument in a method invocation, rather than a specific
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1177 argument value. "It" refers to the argument being matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1178 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1179 This class allows the setup to match a method invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1180 with an arbitrary value, with a value in a specified range, or
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1181 even one that matches a given predicate.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1182 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1183 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1184 <member name="M:Moq.It.IsAny``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1185 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1186 Matches any value of the given <typeparamref name="TValue"/> type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1187 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1188 Typically used when the actual argument value for a method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1189 call is not relevant.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1190 </remarks><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1191 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1192 // Throws an exception for a call to Remove with any string value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1193 mock.Setup(x =&gt; x.Remove(It.IsAny&lt;string&gt;())).Throws(new InvalidOperationException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1194 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1195 </example><typeparam name="TValue">Type of the value.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1196 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1197 <member name="M:Moq.It.IsNotNull``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1198 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1199 Matches any value of the given <typeparamref name="TValue"/> type, except null.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1200 </summary><typeparam name="TValue">Type of the value.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1201 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1202 <member name="M:Moq.It.Is``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1203 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1204 Matches any value that satisfies the given predicate.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1205 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="match">The predicate used to match the method argument.</param><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1206 Allows the specification of a predicate to perform matching
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1207 of method call arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1208 </remarks><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1209 This example shows how to return the value <c>1</c> whenever the argument to the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1210 <c>Do</c> method is an even number.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1211 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1212 mock.Setup(x =&gt; x.Do(It.Is&lt;int&gt;(i =&gt; i % 2 == 0)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1213 .Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1214 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1215 This example shows how to throw an exception if the argument to the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1216 method is a negative number:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1217 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1218 mock.Setup(x =&gt; x.GetUser(It.Is&lt;int&gt;(i =&gt; i &lt; 0)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1219 .Throws(new ArgumentException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1220 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1221 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1222 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1223 <member name="M:Moq.It.IsInRange``1(``0,``0,Moq.Range)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1224 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1225 Matches any value that is in the range specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1226 </summary><typeparam name="TValue">Type of the argument to check.</typeparam><param name="from">The lower bound of the range.</param><param name="to">The upper bound of the range.</param><param name="rangeKind">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1227 The kind of range. See <see cref="T:Moq.Range"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1228 </param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1229 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1230 with an integer argument within the 0..100 range.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1231 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1232 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1233 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1234 It.IsInRange(0, 100, Range.Inclusive)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1235 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1236 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1237 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1238 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1239 <member name="M:Moq.It.IsIn``1(System.Collections.Generic.IEnumerable{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1240 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1241 Matches any value that is present in the sequence specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1242 </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
1243 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1244 with an integer argument with value from a list.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1245 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1246 var values = new List&lt;int&gt; { 1, 2, 3 };
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1247
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1248 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1249 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1250 It.IsIn(values)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1251 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1252 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1253 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1254 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1255 <member name="M:Moq.It.IsIn``1(``0[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1256 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1257 Matches any value that is present in the sequence specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1258 </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
1259 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1260 with an integer argument with a value of 1, 2, or 3.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1261 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1262 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1263 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1264 It.IsIn(1, 2, 3)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1265 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1266 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1267 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1268 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1269 <member name="M:Moq.It.IsNotIn``1(System.Collections.Generic.IEnumerable{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1270 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1271 Matches any value that is not found in the sequence specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1272 </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
1273 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1274 with an integer argument with value not found from a list.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1275 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1276 var values = new List&lt;int&gt; { 1, 2, 3 };
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1277
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1278 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1279 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1280 It.IsNotIn(values)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1281 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1282 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1283 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1284 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1285 <member name="M:Moq.It.IsNotIn``1(``0[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1286 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1287 Matches any value that is not found in the sequence specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1288 </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
1289 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1290 with an integer argument of any value except 1, 2, or 3.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1291 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1292 mock.Setup(x =&gt; x.HasInventory(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1293 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1294 It.IsNotIn(1, 2, 3)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1295 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1296 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1297 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1298 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1299 <member name="M:Moq.It.IsRegex(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1300 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1301 Matches a string argument if it matches the given regular expression pattern.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1302 </summary><param name="regex">The pattern to use to match the string argument value.</param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1303 The following example shows how to expect a call to a method where the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1304 string argument matches the given regular expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1305 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1306 mock.Setup(x =&gt; x.Check(It.IsRegex("[a-z]+"))).Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1307 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1308 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1309 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1310 <member name="M:Moq.It.IsRegex(System.String,System.Text.RegularExpressions.RegexOptions)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1311 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1312 Matches a string argument if it matches the given regular expression pattern.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1313 </summary><param name="regex">The pattern to use to match the string argument value.</param><param name="options">The options used to interpret the pattern.</param><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1314 The following example shows how to expect a call to a method where the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1315 string argument matches the given regular expression, in a case insensitive way:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1316 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1317 mock.Setup(x =&gt; x.Check(It.IsRegex("[a-z]+", RegexOptions.IgnoreCase))).Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1318 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1319 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1320 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1321 <member name="T:Moq.Language.Flow.IReturnsResult`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1322 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1323 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1324 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1325 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1326 <member name="T:Moq.Language.ICallback">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1327 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1328 Defines the <c>Callback</c> verb and overloads.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1329 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1330 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1331 <member name="M:Moq.Language.ICallback.Callback``2(System.Action{``0,``1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1332 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1333 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1334 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1335 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1336 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1337 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1338 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1339 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1340 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1341 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1342 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1343 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1344 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1345 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1346 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1347 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1348 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1349 .Callback((string arg1, string arg2) =&gt; Console.WriteLine(arg1 + arg2));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1350 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1351 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1352 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1353 <member name="M:Moq.Language.ICallback.Callback``3(System.Action{``0,``1,``2})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1354 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1355 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1356 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1357 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1358 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1359 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1360 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1361 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1362 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1363 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1364 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1365 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1366 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1367 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1368 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1369 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1370 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1371 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1372 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1373 .Callback((string arg1, string arg2, string arg3) =&gt; Console.WriteLine(arg1 + arg2 + arg3));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1374 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1375 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1376 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1377 <member name="M:Moq.Language.ICallback.Callback``4(System.Action{``0,``1,``2,``3})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1378 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1379 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1380 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1381 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1382 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1383 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1384 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1385 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1386 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1387 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1388 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1389 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1390 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1391 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1392 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1393 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1394 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1395 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1396 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1397 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1398 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1399 .Callback((string arg1, string arg2, string arg3, string arg4) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1400 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1401 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1402 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1403 <member name="M:Moq.Language.ICallback.Callback``5(System.Action{``0,``1,``2,``3,``4})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1404 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1405 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1406 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1407 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1408 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1409 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1410 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1411 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1412 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1413 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1414 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1415 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1416 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1417 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1418 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1419 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1420 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1421 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1422 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1423 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1424 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1425 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1426 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1427 .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
1428 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1429 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1430 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1431 <member name="M:Moq.Language.ICallback.Callback``6(System.Action{``0,``1,``2,``3,``4,``5})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1432 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1433 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1434 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1435 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1436 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1437 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1438 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1439 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1440 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1441 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1442 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1443 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1444 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1445 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1446 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1447 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1448 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1449 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1450 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1451 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1452 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1453 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1454 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1455 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1456 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1457 .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
1458 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1459 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1460 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1461 <member name="M:Moq.Language.ICallback.Callback``7(System.Action{``0,``1,``2,``3,``4,``5,``6})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1462 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1463 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1464 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1465 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1466 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1467 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1468 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1469 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1470 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1471 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1472 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1473 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1474 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1475 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1476 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1477 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1478 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1479 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1480 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1481 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1482 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1483 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1484 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1485 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1486 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1487 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1488 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1489 .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
1490 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1491 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1492 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1493 <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
1494 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1495 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1496 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1497 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1498 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1499 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1500 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1501 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1502 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1503 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1504 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1505 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1506 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1507 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1508 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1509 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1510 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1511 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1512 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1513 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1514 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1515 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1516 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1517 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1518 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1519 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1520 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1521 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1522 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1523 .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
1524 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1525 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1526 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1527 <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
1528 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1529 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1530 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1531 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1532 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1533 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1534 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1535 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1536 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1537 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1538 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1539 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1540 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1541 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1542 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1543 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1544 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1545 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1546 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1547 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1548 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1549 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1550 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1551 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1552 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1553 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1554 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1555 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1556 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1557 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1558 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1559 .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
1560 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1561 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1562 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1563 <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
1564 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1565 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1566 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1567 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1568 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1569 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1570 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1571 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1572 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1573 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1574 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1575 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1576 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1577 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1578 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1579 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1580 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1581 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1582 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1583 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1584 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1585 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1586 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1587 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1588 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1589 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1590 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1591 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1592 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1593 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1594 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1595 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1596 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1597 .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
1598 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1599 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1600 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1601 <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
1602 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1603 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1604 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1605 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1606 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1607 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1608 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1609 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1610 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1611 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1612 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1613 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1614 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1615 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1616 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1617 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1618 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1619 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1620 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1621 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1622 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1623 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1624 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1625 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1626 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1627 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1628 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1629 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1630 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1631 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1632 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1633 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1634 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1635 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1636 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1637 .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
1638 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1639 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1640 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1641 <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
1642 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1643 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1644 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1645 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1646 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1647 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1648 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1649 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1650 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1651 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1652 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1653 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1654 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1655 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1656 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1657 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1658 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1659 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1660 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1661 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1662 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1663 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1664 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1665 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1666 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1667 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1668 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1669 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1670 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1671 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1672 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1673 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1674 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1675 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1676 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1677 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1678 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1679 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1680 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1681 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1682 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1683 <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
1684 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1685 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1686 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1687 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1688 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1689 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1690 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1691 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1692 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1693 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1694 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1695 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1696 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1697 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1698 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1699 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1700 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1701 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1702 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1703 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1704 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1705 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1706 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1707 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1708 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1709 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1710 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1711 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1712 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1713 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1714 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1715 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1716 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1717 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1718 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1719 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1720 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1721 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1722 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1723 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1724 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1725 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1726 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1727 <member name="M:Moq.Language.ICallback.Callback``14(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1728 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1729 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1730 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1731 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1732 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1733 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1734 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1735 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1736 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1737 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1738 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1739 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1740 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1741 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1742 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1743 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1744 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1745 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1746 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1747 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1748 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1749 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1750 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1751 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1752 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1753 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1754 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1755 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1756 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1757 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1758 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1759 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1760 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1761 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1762 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1763 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1764 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1765 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1766 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1767 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1768 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1769 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1770 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1771 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1772 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1773 <member name="M:Moq.Language.ICallback.Callback``15(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1774 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1775 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1776 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1777 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1778 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1779 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1780 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1781 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1782 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1783 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1784 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1785 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1786 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1787 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1788 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1789 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1790 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1791 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1792 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1793 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1794 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1795 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1796 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1797 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1798 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1799 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1800 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1801 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1802 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1803 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1804 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1805 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1806 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1807 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1808 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1809 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1810 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1811 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1812 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1813 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1814 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1815 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1816 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1817 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) =&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
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.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
1822 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1823 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1824 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1825 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1826 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1827 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1828 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1829 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1830 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1831 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1832 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1833 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1834 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1835 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1836 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1837 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1838 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1839 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1840 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1841 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1842 <returns>A reference to <see cref="T:Moq.Language.Flow.ICallbackResult"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1843 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1844 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1845 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1846 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1847 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1848 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1849 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1850 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1851 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1852 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1853 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1854 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1855 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1856 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1857 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1858 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1859 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1860 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1861 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1862 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1863 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1864 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1865 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1866 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1867 .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) =&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
1868 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1869 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1870 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1871 <member name="M:Moq.Language.ICallback.Callback(System.Action)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1872 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1873 Specifies a callback to invoke when the method is called.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1874 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1875 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1876 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1877 The following example specifies a callback to set a boolean
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1878 value that can be used later:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1879 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1880 var called = false;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1881 mock.Setup(x => x.Execute())
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1882 .Callback(() => called = true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1883 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1884 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1885 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1886 <member name="M:Moq.Language.ICallback.Callback``1(System.Action{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1887 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1888 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1889 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1890 <typeparam name="T">The argument type of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1891 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1892 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1893 Invokes the given callback with the concrete invocation argument value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1894 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1895 Notice how the specific string argument is retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1896 it as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1897 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1898 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1899 mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1900 .Callback((string command) => Console.WriteLine(command));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1901 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1902 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1903 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1904 <member name="T:Moq.Language.IOccurrence">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1905 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1906 Defines occurrence members to constraint setups.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1907 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1908 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1909 <member name="M:Moq.Language.IOccurrence.AtMostOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1910 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1911 The expected invocation can happen at most once.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1912 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1913 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1914 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1915 var mock = new Mock&lt;ICommand&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1916 mock.Setup(foo => foo.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1917 .AtMostOnce();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1918 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1919 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1920 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1921 <member name="M:Moq.Language.IOccurrence.AtMost(System.Int32)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1922 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1923 The expected invocation can happen at most specified number of times.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1924 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1925 <param name="callCount">The number of times to accept calls.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1926 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1927 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1928 var mock = new Mock&lt;ICommand&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1929 mock.Setup(foo => foo.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1930 .AtMost( 5 );
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1931 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1932 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1933 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1934 <member name="T:Moq.Language.IRaise`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1935 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1936 Defines the <c>Raises</c> verb.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1937 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1938 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1939 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1940 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1941 Specifies the event that will be raised
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1942 when the setup is met.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1943 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1944 <param name="eventExpression">An expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1945 <param name="args">The event arguments to pass for the raised event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1946 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1947 The following example shows how to raise an event when
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1948 the setup is met:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1949 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1950 var mock = new Mock&lt;IContainer&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1951
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1952 mock.Setup(add => add.Add(It.IsAny&lt;string&gt;(), It.IsAny&lt;object&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1953 .Raises(add => add.Added += null, EventArgs.Empty);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1954 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1955 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1956 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1957 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.Func{System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1958 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1959 Specifies the event that will be raised
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1960 when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1961 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1962 <param name="eventExpression">An expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1963 <param name="func">A function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1964 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1965 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1966 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1967 <member name="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1968 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1969 Specifies the custom event that will be raised
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1970 when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1971 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1972 <param name="eventExpression">An expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1973 <param name="args">The arguments to pass to the custom delegate (non EventHandler-compatible).</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1974 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1975 <member name="M:Moq.Language.IRaise`1.Raises``1(System.Action{`0},System.Func{``0,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1976 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1977 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1978 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1979 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1980 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1981 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1982 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1983 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1984 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1985 <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
1986 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1987 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1988 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1989 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1990 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1991 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1992 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1993 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1994 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1995 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1996 <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
1997 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1998 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
1999 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2000 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2001 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2002 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2003 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2004 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2005 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2006 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2007 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2008 <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
2009 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2010 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2011 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2012 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2013 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2014 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2015 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2016 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2017 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2018 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2019 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2020 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2021 <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
2022 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2023 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2024 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2025 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2026 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2027 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2028 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2029 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2030 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2031 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2032 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2033 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2034 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2035 <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
2036 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2037 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2038 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2039 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2040 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2041 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2042 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2043 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2044 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2045 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2046 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2047 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2048 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2049 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2050 <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
2051 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2052 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2053 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2054 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2055 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2056 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2057 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2058 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2059 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2060 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2061 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2062 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2063 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2064 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2065 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2066 <member name="M:Moq.Language.IRaise`1.Raises``8(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2067 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2068 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2069 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2070 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2071 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2072 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2073 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2074 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2075 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2076 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2077 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2078 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2079 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2080 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2081 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2082 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2083 <member name="M:Moq.Language.IRaise`1.Raises``9(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2084 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2085 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2086 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2087 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2088 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2089 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2090 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2091 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2092 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2093 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2094 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2095 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2096 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2097 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2098 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2099 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2100 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2101 <member name="M:Moq.Language.IRaise`1.Raises``10(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2102 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2103 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2104 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2105 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2106 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2107 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2108 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2109 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2110 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2111 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2112 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2113 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2114 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2115 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2116 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2117 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2118 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2119 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2120 <member name="M:Moq.Language.IRaise`1.Raises``11(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2121 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2122 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2123 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2124 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2125 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2126 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2127 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2128 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2129 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2130 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2131 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2132 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2133 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2134 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2135 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2136 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2137 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2138 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2139 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2140 <member name="M:Moq.Language.IRaise`1.Raises``12(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2141 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2142 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2143 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2144 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2145 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2146 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2147 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2148 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2149 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2150 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2151 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2152 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2153 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2154 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2155 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2156 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2157 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2158 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2159 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2160 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2161 <member name="M:Moq.Language.IRaise`1.Raises``13(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2162 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2163 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2164 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2165 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2166 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2167 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2168 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2169 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2170 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2171 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2172 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2173 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2174 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2175 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2176 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2177 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2178 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2179 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2180 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2181 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2182 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2183 <member name="M:Moq.Language.IRaise`1.Raises``14(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2184 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2185 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2186 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2187 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2188 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2189 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2190 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2191 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2192 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2193 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2194 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2195 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2196 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2197 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2198 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2199 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2200 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2201 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2202 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2203 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2204 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2205 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2206 <member name="M:Moq.Language.IRaise`1.Raises``15(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2207 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2208 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2209 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2210 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2211 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2212 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2213 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2214 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2215 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2216 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2217 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2218 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2219 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2220 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2221 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2222 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2223 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2224 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2225 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2226 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2227 <typeparam name="T15">The type of the fifteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2228 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2229 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2230 <member name="M:Moq.Language.IRaise`1.Raises``16(System.Action{`0},System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15,System.EventArgs})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2231 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2232 Specifies the event that will be raised when the setup is matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2233 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2234 <param name="eventExpression">The expression that represents an event attach or detach action.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2235 <param name="func">The function that will build the <see cref="T:System.EventArgs"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2236 to pass when raising the event.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2237 <typeparam name="T1">The type of the first argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2238 <typeparam name="T2">The type of the second argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2239 <typeparam name="T3">The type of the third argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2240 <typeparam name="T4">The type of the fourth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2241 <typeparam name="T5">The type of the fifth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2242 <typeparam name="T6">The type of the sixth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2243 <typeparam name="T7">The type of the seventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2244 <typeparam name="T8">The type of the eighth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2245 <typeparam name="T9">The type of the nineth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2246 <typeparam name="T10">The type of the tenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2247 <typeparam name="T11">The type of the eleventh argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2248 <typeparam name="T12">The type of the twelfth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2249 <typeparam name="T13">The type of the thirteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2250 <typeparam name="T14">The type of the fourteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2251 <typeparam name="T15">The type of the fifteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2252 <typeparam name="T16">The type of the sixteenth argument received by the expected invocation.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2253 <seealso cref="M:Moq.Language.IRaise`1.Raises(System.Action{`0},System.EventArgs)"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2254 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2255 <member name="T:Moq.Language.IVerifies">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2256 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2257 Defines the <c>Verifiable</c> verb.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2258 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2259 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2260 <member name="M:Moq.Language.IVerifies.Verifiable">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2261 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2262 Marks the expectation as verifiable, meaning that a call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2263 to <see cref="M:Moq.Mock.Verify"/> will check if this particular
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2264 expectation was met.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2265 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2266 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2267 The following example marks the expectation as verifiable:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2268 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2269 mock.Expect(x =&gt; x.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2270 .Returns(true)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2271 .Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2272 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2273 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2274 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2275 <member name="M:Moq.Language.IVerifies.Verifiable(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2276 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2277 Marks the expectation as verifiable, meaning that a call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2278 to <see cref="M:Moq.Mock.Verify"/> will check if this particular
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2279 expectation was met, and specifies a message for failures.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2280 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2281 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2282 The following example marks the expectation as verifiable:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2283 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2284 mock.Expect(x =&gt; x.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2285 .Returns(true)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2286 .Verifiable("Ping should be executed always!");
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2287 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2288 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2289 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2290 <member name="T:Moq.Language.Flow.ISetup`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2291 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2292 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2293 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2294 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2295 <member name="T:Moq.Language.Flow.ICallbackResult">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2296 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2297 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2298 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2299 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2300 <member name="T:Moq.Language.IThrows">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2301 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2302 Defines the <c>Throws</c> verb.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2303 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2304 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2305 <member name="M:Moq.Language.IThrows.Throws(System.Exception)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2306 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2307 Specifies the exception to throw when the method is invoked.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2308 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2309 <param name="exception">Exception instance to throw.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2310 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2311 This example shows how to throw an exception when the method is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2312 invoked with an empty string argument:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2313 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2314 mock.Setup(x =&gt; x.Execute(""))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2315 .Throws(new ArgumentException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2316 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2317 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2318 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2319 <member name="M:Moq.Language.IThrows.Throws``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2320 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2321 Specifies the type of exception to throw when the method is invoked.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2322 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2323 <typeparam name="TException">Type of exception to instantiate and throw when the setup is matched.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2324 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2325 This example shows how to throw an exception when the method is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2326 invoked with an empty string argument:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2327 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2328 mock.Setup(x =&gt; x.Execute(""))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2329 .Throws&lt;ArgumentException&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2330 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2331 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2332 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2333 <member name="T:Moq.Language.Flow.IThrowsResult">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2334 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2335 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2336 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2337 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2338 <member name="T:Moq.Language.Flow.ISetup`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2339 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2340 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2341 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2342 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2343 <member name="T:Moq.Language.ICallback`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2344 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2345 Defines the <c>Callback</c> verb and overloads for callbacks on
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2346 setups that return a value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2347 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2348 <typeparam name="TMock">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2349 <typeparam name="TResult">Type of the return value of the setup.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2350 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2351 <member name="M:Moq.Language.ICallback`2.Callback``2(System.Action{``0,``1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2352 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2353 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2354 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2355 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2356 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2357 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2358 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2359 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2360 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2361 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2362 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2363 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2364 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2365 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2366 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2367 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2368 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2369 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2370 .Callback((arg1, arg2) =&gt; Console.WriteLine(arg1 + arg2));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2371 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2372 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2373 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2374 <member name="M:Moq.Language.ICallback`2.Callback``3(System.Action{``0,``1,``2})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2375 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2376 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2377 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2378 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2379 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2380 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2381 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2382 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2383 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2384 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2385 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2386 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2387 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2388 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2389 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2390 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2391 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2392 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2393 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2394 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2395 .Callback((arg1, arg2, arg3) =&gt; Console.WriteLine(arg1 + arg2 + arg3));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2396 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2397 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2398 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2399 <member name="M:Moq.Language.ICallback`2.Callback``4(System.Action{``0,``1,``2,``3})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2400 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2401 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2402 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2403 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2404 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2405 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2406 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2407 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2408 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2409 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2410 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2411 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2412 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2413 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2414 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2415 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2416 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2417 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2418 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2419 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2420 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2421 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2422 .Callback((arg1, arg2, arg3, arg4) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2423 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2424 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2425 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2426 <member name="M:Moq.Language.ICallback`2.Callback``5(System.Action{``0,``1,``2,``3,``4})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2427 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2428 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2429 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2430 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2431 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2432 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2433 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2434 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2435 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2436 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2437 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2438 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2439 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2440 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2441 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2442 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2443 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2444 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2445 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2446 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2447 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2448 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2449 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2450 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2451 .Callback((arg1, arg2, arg3, arg4, arg5) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2452 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2453 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2454 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2455 <member name="M:Moq.Language.ICallback`2.Callback``6(System.Action{``0,``1,``2,``3,``4,``5})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2456 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2457 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2458 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2459 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2460 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2461 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2462 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2463 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2464 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2465 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2466 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2467 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2468 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2469 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2470 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2471 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2472 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2473 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2474 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2475 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2476 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2477 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2478 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2479 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2480 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2481 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2482 .Callback((arg1, arg2, arg3, arg4, arg5, arg6) =&gt; Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2483 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2484 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2485 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2486 <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
2487 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2488 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2489 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2490 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2491 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2492 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2493 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2494 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2495 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2496 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2497 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2498 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2499 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2500 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2501 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2502 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2503 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2504 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2505 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2506 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2507 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2508 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2509 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2510 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2511 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2512 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2513 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2514 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2515 .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
2516 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2517 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2518 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2519 <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
2520 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2521 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2522 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2523 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2524 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2525 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2526 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2527 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2528 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2529 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2530 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2531 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2532 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2533 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2534 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2535 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2536 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2537 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2538 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2539 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2540 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2541 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2542 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2543 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2544 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2545 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2546 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2547 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2548 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2549 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2550 .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
2551 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2552 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2553 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2554 <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
2555 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2556 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2557 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2558 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2559 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2560 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2561 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2562 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2563 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2564 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2565 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2566 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2567 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2568 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2569 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2570 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2571 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2572 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2573 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2574 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2575 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2576 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2577 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2578 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2579 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2580 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2581 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2582 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2583 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2584 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2585 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2586 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2587 .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
2588 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2589 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2590 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2591 <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
2592 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2593 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2594 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2595 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2596 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2597 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2598 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2599 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2600 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2601 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2602 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2603 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2604 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2605 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2606 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2607 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2608 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2609 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2610 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2611 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2612 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2613 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2614 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2615 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2616 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2617 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2618 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2619 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2620 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2621 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2622 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2623 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2624 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2625 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2626 .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
2627 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2628 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2629 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2630 <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
2631 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2632 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2633 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2634 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2635 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2636 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2637 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2638 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2639 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2640 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2641 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2642 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2643 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2644 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2645 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2646 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2647 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2648 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2649 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2650 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2651 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2652 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2653 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2654 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2655 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2656 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2657 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2658 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2659 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2660 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2661 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2662 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2663 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2664 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2665 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2666 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2667 .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
2668 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2669 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2670 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2671 <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
2672 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2673 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2674 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2675 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2676 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2677 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2678 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2679 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2680 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2681 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2682 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2683 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2684 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2685 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2686 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2687 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2688 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2689 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2690 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2691 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2692 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2693 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2694 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2695 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2696 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2697 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2698 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2699 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2700 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2701 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2702 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2703 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2704 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2705 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2706 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2707 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2708 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2709 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2710 .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
2711 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2712 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2713 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2714 <member name="M:Moq.Language.ICallback`2.Callback``13(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2715 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2716 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2717 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2718 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2719 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2720 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2721 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2722 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2723 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2724 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2725 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2726 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2727 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2728 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2729 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2730 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2731 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2732 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2733 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2734 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2735 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2736 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2737 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2738 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2739 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2740 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2741 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2742 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2743 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2744 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2745 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2746 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2747 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2748 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2749 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2750 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2751 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2752 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2753 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2754 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2755 .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
2756 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2757 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2758 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2759 <member name="M:Moq.Language.ICallback`2.Callback``14(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2760 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2761 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2762 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2763 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2764 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2765 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2766 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2767 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2768 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2769 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2770 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2771 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2772 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2773 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2774 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2775 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2776 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2777 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2778 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2779 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2780 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2781 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2782 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2783 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2784 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2785 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2786 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2787 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2788 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2789 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2790 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2791 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2792 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2793 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2794 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2795 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2796 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2797 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2798 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2799 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2800 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2801 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2802 .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
2803 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2804 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2805 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2806 <member name="M:Moq.Language.ICallback`2.Callback``15(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2807 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2808 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2809 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2810 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2811 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2812 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2813 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2814 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2815 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2816 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2817 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2818 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2819 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2820 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2821 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2822 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2823 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2824 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2825 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2826 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2827 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2828 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2829 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2830 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2831 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2832 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2833 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2834 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2835 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2836 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2837 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2838 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2839 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2840 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2841 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2842 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2843 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2844 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2845 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2846 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2847 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2848 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2849 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2850 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2851 .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
2852 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2853 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2854 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2855 <member name="M:Moq.Language.ICallback`2.Callback``16(System.Action{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2856 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2857 Specifies a callback to invoke when the method is called that receives the original
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2858 arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2859 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2860 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2861 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2862 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2863 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2864 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2865 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2866 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2867 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2868 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2869 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2870 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2871 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2872 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2873 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2874 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2875 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2876 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2877 <returns>A reference to <see cref="T:Moq.Language.Flow.IReturnsThrows`2"/> interface.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2878 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2879 Invokes the given callback with the concrete invocation arguments values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2880 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2881 Notice how the specific arguments are retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2882 them as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2883 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2884 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2885 mock.Setup(x =&gt; x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2886 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2887 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2888 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2889 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2890 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2891 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2892 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2893 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2894 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2895 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2896 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2897 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2898 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2899 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2900 It.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2901 It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2902 .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
2903 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2904 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2905 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2906 <member name="M:Moq.Language.ICallback`2.Callback(System.Action)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2907 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2908 Specifies a callback to invoke when the method is called.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2909 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2910 <param name="action">The callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2911 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2912 The following example specifies a callback to set a boolean value that can be used later:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2913 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2914 var called = false;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2915 mock.Setup(x => x.Execute())
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2916 .Callback(() => called = true)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2917 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2918 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2919 Note that in the case of value-returning methods, after the <c>Callback</c>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2920 call you can still specify the return value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2921 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2922 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2923 <member name="M:Moq.Language.ICallback`2.Callback``1(System.Action{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2924 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2925 Specifies a callback to invoke when the method is called that receives the original arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2926 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2927 <typeparam name="T">The type of the argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2928 <param name="action">Callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2929 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2930 Invokes the given callback with the concrete invocation argument value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2931 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2932 Notice how the specific string argument is retrieved by simply declaring
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2933 it as part of the lambda expression for the callback:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2934 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2935 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2936 mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2937 .Callback(command => Console.WriteLine(command))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2938 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2939 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2940 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2941 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2942 <member name="T:Moq.Language.Flow.IReturnsThrows`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2943 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2944 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2945 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2946 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2947 <member name="T:Moq.Language.IReturns`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2948 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2949 Defines the <c>Returns</c> verb.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2950 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2951 <typeparam name="TMock">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2952 <typeparam name="TResult">Type of the return value from the expression.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2953 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2954 <member name="M:Moq.Language.IReturns`2.Returns``2(System.Func{``0,``1,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2955 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2956 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2957 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2958 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2959 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2960 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2961 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2962 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2963 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2964 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2965 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2966 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2967 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2968 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2969 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2970 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2971 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2972 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2973 .Returns((string arg1, string arg2) => arg1 + arg2);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2974 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2975 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2976 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2977 <member name="M:Moq.Language.IReturns`2.Returns``3(System.Func{``0,``1,``2,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2978 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2979 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2980 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2981 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2982 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2983 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2984 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2985 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2986 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2987 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2988 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2989 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2990 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2991 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2992 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2993 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2994 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2995 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2996 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2997 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2998 .Returns((string arg1, string arg2, string arg3) => arg1 + arg2 + arg3);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
2999 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3000 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3001 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3002 <member name="M:Moq.Language.IReturns`2.Returns``4(System.Func{``0,``1,``2,``3,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3003 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3004 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3005 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3006 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3007 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3008 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3009 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3010 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3011 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3012 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3013 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3014 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3015 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3016 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3017 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3018 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3019 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3020 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3021 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3022 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3023 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3024 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3025 .Returns((string arg1, string arg2, string arg3, string arg4) => arg1 + arg2 + arg3 + arg4);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3026 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3027 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3028 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3029 <member name="M:Moq.Language.IReturns`2.Returns``5(System.Func{``0,``1,``2,``3,``4,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3030 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3031 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3032 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3033 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3034 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3035 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3036 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3037 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3038 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3039 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3040 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3041 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3042 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3043 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3044 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3045 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3046 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3047 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3048 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3049 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3050 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3051 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3052 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3053 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3054 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5) => arg1 + arg2 + arg3 + arg4 + arg5);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3055 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3056 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3057 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3058 <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
3059 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3060 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3061 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3062 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3063 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3064 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3065 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3066 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3067 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3068 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3069 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3070 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3071 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3072 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3073 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3074 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3075 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3076 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3077 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3078 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3079 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3080 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3081 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3082 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3083 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3084 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3085 .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
3086 </code>
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.IReturns`2.Returns``7(System.Func{``0,``1,``2,``3,``4,``5,``6,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3090 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3091 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3092 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3093 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3094 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3095 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3096 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3097 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3098 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3099 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3100 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3101 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3102 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3103 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3104 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3105 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3106 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3107 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3108 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3109 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3110 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3111 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3112 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3113 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3114 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3115 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3116 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3117 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3118 .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
3119 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3120 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3121 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3122 <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
3123 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3124 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3125 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3126 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3127 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3128 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3129 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3130 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3131 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3132 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3133 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3134 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3135 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3136 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3137 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3138 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3139 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3140 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3141 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3142 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3143 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3144 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3145 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3146 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3147 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3148 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3149 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3150 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3151 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3152 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3153 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3154 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3155 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3156 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3157 <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
3158 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3159 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3160 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3161 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3162 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3163 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3164 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3165 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3166 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3167 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3168 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3169 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3170 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3171 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3172 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3173 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3174 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3175 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3176 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3177 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3178 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3179 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3180 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3181 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3182 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3183 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3184 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3185 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3186 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3187 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3188 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3189 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3190 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3191 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3192 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3193 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3194 <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
3195 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3196 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3197 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3198 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3199 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3200 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3201 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3202 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3203 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3204 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3205 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3206 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3207 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3208 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3209 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3210 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3211 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3212 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3213 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3214 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3215 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3216 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3217 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3218 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3219 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3220 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3221 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3222 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3223 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3224 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3225 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3226 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3227 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3228 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3229 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3230 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3231 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3232 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3233 <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
3234 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3235 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3236 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3237 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3238 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3239 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3240 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3241 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3242 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3243 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3244 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3245 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3246 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3247 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3248 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3249 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3250 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3251 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3252 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3253 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3254 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3255 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3256 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3257 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3258 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3259 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3260 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3261 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3262 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3263 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3264 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3265 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3266 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3267 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3268 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3269 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3270 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3271 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3272 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3273 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3274 <member name="M:Moq.Language.IReturns`2.Returns``12(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3275 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3276 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3277 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3278 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3279 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3280 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3281 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3282 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3283 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3284 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3285 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3286 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3287 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3288 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3289 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3290 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3291 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3292 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3293 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3294 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3295 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3296 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3297 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3298 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3299 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3300 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3301 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3302 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3303 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3304 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3305 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3306 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3307 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3308 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3309 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3310 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3311 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3312 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3313 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3314 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3315 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3316 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3317 <member name="M:Moq.Language.IReturns`2.Returns``13(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3318 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3319 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3320 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3321 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3322 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3323 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3324 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3325 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3326 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3327 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3328 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3329 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3330 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3331 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3332 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3333 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3334 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3335 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3336 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3337 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3338 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3339 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3340 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3341 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3342 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3343 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3344 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3345 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3346 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3347 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3348 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3349 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3350 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3351 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3352 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3353 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3354 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3355 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3356 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3357 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3358 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3359 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3360 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3361 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3362 <member name="M:Moq.Language.IReturns`2.Returns``14(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3363 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3364 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3365 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3366 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3367 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3368 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3369 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3370 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3371 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3372 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3373 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3374 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3375 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3376 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3377 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3378 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3379 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3380 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3381 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3382 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3383 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3384 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3385 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3386 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3387 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3388 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3389 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3390 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3391 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3392 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3393 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3394 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3395 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3396 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3397 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3398 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3399 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3400 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3401 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3402 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3403 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3404 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3405 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3406 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3407 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3408 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3409 <member name="M:Moq.Language.IReturns`2.Returns``15(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3410 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3411 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3412 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3413 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3414 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3415 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3416 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3417 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3418 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3419 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3420 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3421 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3422 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3423 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3424 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3425 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3426 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3427 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3428 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3429 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3430 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3431 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3432 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3433 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3434 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3435 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3436 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3437 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3438 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3439 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3440 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3441 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3442 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3443 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3444 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3445 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3446 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3447 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3448 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3449 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3450 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3451 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3452 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3453 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3454 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3455 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3456 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3457 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3458 <member name="M:Moq.Language.IReturns`2.Returns``16(System.Func{``0,``1,``2,``3,``4,``5,``6,``7,``8,``9,``10,``11,``12,``13,``14,``15,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3459 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3460 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3461 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3462 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3463 <typeparam name="T1">The type of the first argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3464 <typeparam name="T2">The type of the second argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3465 <typeparam name="T3">The type of the third argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3466 <typeparam name="T4">The type of the fourth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3467 <typeparam name="T5">The type of the fifth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3468 <typeparam name="T6">The type of the sixth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3469 <typeparam name="T7">The type of the seventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3470 <typeparam name="T8">The type of the eighth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3471 <typeparam name="T9">The type of the nineth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3472 <typeparam name="T10">The type of the tenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3473 <typeparam name="T11">The type of the eleventh argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3474 <typeparam name="T12">The type of the twelfth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3475 <typeparam name="T13">The type of the thirteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3476 <typeparam name="T14">The type of the fourteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3477 <typeparam name="T15">The type of the fifteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3478 <typeparam name="T16">The type of the sixteenth argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3479 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3480 <return>Returns a calculated value which is evaluated lazily at the time of the invocation.</return>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3481 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3482 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3483 The return value is calculated from the value of the actual method invocation arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3484 Notice how the arguments are retrieved by simply declaring them as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3485 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3486 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3487 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3488 mock.Setup(x => x.Execute(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3489 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3490 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3491 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3492 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3493 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3494 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3495 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3496 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3497 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3498 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3499 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3500 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3501 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3502 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3503 It.IsAny&lt;int&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3504 It.IsAny&lt;int&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3505 .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3506 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3507 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3508 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3509 <member name="M:Moq.Language.IReturns`2.Returns(`1)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3510 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3511 Specifies the value to return.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3512 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3513 <param name="value">The value to return, or <see langword="null"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3514 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3515 Return a <c>true</c> value from the method call:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3516 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3517 mock.Setup(x => x.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3518 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3519 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3520 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3521 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3522 <member name="M:Moq.Language.IReturns`2.Returns(System.Func{`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3523 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3524 Specifies a function that will calculate the value to return from the method.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3525 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3526 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3527 <example group="returns">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3528 Return a calculated value when the method is called:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3529 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3530 mock.Setup(x => x.Execute("ping"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3531 .Returns(() => returnValues[0]);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3532 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3533 The lambda expression to retrieve the return value is lazy-executed,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3534 meaning that its value may change depending on the moment the method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3535 is executed and the value the <c>returnValues</c> array has at
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3536 that moment.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3537 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3538 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3539 <member name="M:Moq.Language.IReturns`2.Returns``1(System.Func{``0,`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3540 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3541 Specifies a function that will calculate the value to return from the method,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3542 retrieving the arguments for the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3543 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3544 <typeparam name="T">The type of the argument of the invoked method.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3545 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3546 <example group="returns">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3547 Return a calculated value which is evaluated lazily at the time of the invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3548 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3549 The lookup list can change between invocations and the setup
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3550 will return different values accordingly. Also, notice how the specific
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3551 string argument is retrieved by simply declaring it as part of the lambda
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3552 expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3553 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3554 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3555 mock.Setup(x => x.Execute(It.IsAny&lt;string&gt;()))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3556 .Returns((string command) => returnValues[command]);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3557 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3558 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3559 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3560 <member name="M:Moq.Language.IReturns`2.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3561 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3562 Calls the real method of the object and returns its return value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3563 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3564 <returns>The value calculated by the real method of the object.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3565 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3566 <member name="T:Moq.Language.Flow.ISetupGetter`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3567 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3568 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3569 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3570 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3571 <member name="T:Moq.Language.ICallbackGetter`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3572 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3573 Defines the <c>Callback</c> verb for property getter setups.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3574 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3575 <seealso cref="M:Moq.Mock`1.SetupGet``1(System.Linq.Expressions.Expression{System.Func{`0,``0}})"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3576 <typeparam name="TMock">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3577 <typeparam name="TProperty">Type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3578 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3579 <member name="M:Moq.Language.ICallbackGetter`2.Callback(System.Action)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3580 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3581 Specifies a callback to invoke when the property is retrieved.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3582 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3583 <param name="action">Callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3584 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3585 Invokes the given callback with the property value being set.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3586 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3587 mock.SetupGet(x => x.Suspended)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3588 .Callback(() => called = true)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3589 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3590 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3591 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3592 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3593 <member name="T:Moq.Language.Flow.IReturnsThrowsGetter`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3594 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3595 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3596 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3597 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3598 <member name="T:Moq.Language.IReturnsGetter`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3599 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3600 Defines the <c>Returns</c> verb for property get setups.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3601 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3602 <typeparam name="TMock">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3603 <typeparam name="TProperty">Type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3604 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3605 <member name="M:Moq.Language.IReturnsGetter`2.Returns(`1)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3606 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3607 Specifies the value to return.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3608 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3609 <param name="value">The value to return, or <see langword="null"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3610 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3611 Return a <c>true</c> value from the property getter call:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3612 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3613 mock.SetupGet(x => x.Suspended)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3614 .Returns(true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3615 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3616 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3617 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3618 <member name="M:Moq.Language.IReturnsGetter`2.Returns(System.Func{`1})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3619 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3620 Specifies a function that will calculate the value to return for the property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3621 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3622 <param name="valueFunction">The function that will calculate the return value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3623 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3624 Return a calculated value when the property is retrieved:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3625 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3626 mock.SetupGet(x => x.Suspended)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3627 .Returns(() => returnValues[0]);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3628 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3629 The lambda expression to retrieve the return value is lazy-executed,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3630 meaning that its value may change depending on the moment the property
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3631 is retrieved and the value the <c>returnValues</c> array has at
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3632 that moment.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3633 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3634 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3635 <member name="M:Moq.Language.IReturnsGetter`2.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3636 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3637 Calls the real property of the object and returns its return value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3638 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3639 <returns>The value calculated by the real property of the object.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3640 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3641 <member name="T:Moq.Language.Flow.ISetupSetter`2">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3642 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3643 Implements the fluent API.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3644 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3645 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3646 <member name="T:Moq.Language.ICallbackSetter`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3647 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3648 Defines the <c>Callback</c> verb for property setter setups.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3649 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3650 <typeparam name="TProperty">Type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3651 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3652 <member name="M:Moq.Language.ICallbackSetter`1.Callback(System.Action{`0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3653 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3654 Specifies a callback to invoke when the property is set that receives the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3655 property value being set.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3656 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3657 <param name="action">Callback method to invoke.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3658 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3659 Invokes the given callback with the property value being set.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3660 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3661 mock.SetupSet(x => x.Suspended)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3662 .Callback((bool state) => Console.WriteLine(state));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3663 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3664 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3665 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3666 <member name="T:Moq.Language.ISetupSequentialResult`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3667 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3668 Language for ReturnSequence
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3669 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3670 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3671 <member name="M:Moq.Language.ISetupSequentialResult`1.Returns(`0)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3672 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3673 Returns value
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3674 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3675 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3676 <member name="M:Moq.Language.ISetupSequentialResult`1.Throws(System.Exception)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3677 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3678 Throws an exception
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3679 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3680 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3681 <member name="M:Moq.Language.ISetupSequentialResult`1.Throws``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3682 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3683 Throws an exception
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3684 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3685 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3686 <member name="M:Moq.Language.ISetupSequentialResult`1.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3687 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3688 Calls original method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3689 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3690 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3691 <member name="F:Moq.Linq.FluentMockVisitor.isFirst">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3692 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3693 The first method call or member access will be the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3694 last segment of the expression (depth-first traversal),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3695 which is the one we have to Setup rather than FluentMock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3696 And the last one is the one we have to Mock.Get rather
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3697 than FluentMock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3698 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3699 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3700 <member name="T:Moq.Linq.MockQueryable`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3701 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3702 A default implementation of IQueryable for use with QueryProvider
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3703 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3704 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3705 <member name="M:Moq.Linq.MockQueryable`1.#ctor(System.Linq.Expressions.MethodCallExpression)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3706 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3707 The <paramref name="underlyingCreateMocks"/> is a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3708 static method that returns an IQueryable of Mocks of T which is used to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3709 apply the linq specification to.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3710 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3711 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3712 <member name="T:Moq.MockRepository">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3713 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3714 Utility repository class to use to construct multiple
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3715 mocks when consistent verification is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3716 desired for all of them.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3717 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3718 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3719 If multiple mocks will be created during a test, passing
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3720 the desired <see cref="T:Moq.MockBehavior"/> (if different than the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3721 <see cref="F:Moq.MockBehavior.Default"/> or the one
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3722 passed to the repository constructor) and later verifying each
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3723 mock can become repetitive and tedious.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3724 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3725 This repository class helps in that scenario by providing a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3726 simplified creation of multiple mocks with a default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3727 <see cref="T:Moq.MockBehavior"/> (unless overriden by calling
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3728 <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/>) and posterior verification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3729 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3730 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3731 <example group="repository">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3732 The following is a straightforward example on how to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3733 create and automatically verify strict mocks using a <see cref="T:Moq.MockRepository"/>:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3734 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3735 var repository = new MockRepository(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3736
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3737 var foo = repository.Create&lt;IFoo&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3738 var bar = repository.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3739
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3740 // no need to call Verifiable() on the setup
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3741 // as we'll be validating all of them anyway.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3742 foo.Setup(f =&gt; f.Do());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3743 bar.Setup(b =&gt; b.Redo());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3744
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3745 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3746
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3747 repository.VerifyAll();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3748 // At this point all setups are already checked
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3749 // and an optional MockException might be thrown.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3750 // Note also that because the mocks are strict, any invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3751 // that doesn't have a matching setup will also throw a MockException.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3752 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3753 The following examples shows how to setup the repository
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3754 to create loose mocks and later verify only verifiable setups:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3755 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3756 var repository = new MockRepository(MockBehavior.Loose);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3757
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3758 var foo = repository.Create&lt;IFoo&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3759 var bar = repository.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3760
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3761 // this setup will be verified when we verify the repository
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3762 foo.Setup(f =&gt; f.Do()).Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3763
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3764 // this setup will NOT be verified
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3765 foo.Setup(f =&gt; f.Calculate());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3766
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3767 // this setup will be verified when we verify the repository
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3768 bar.Setup(b =&gt; b.Redo()).Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3769
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3770 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3771 // note that because the mocks are Loose, members
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3772 // called in the interfaces for which no matching
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3773 // setups exist will NOT throw exceptions,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3774 // and will rather return default values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3775
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3776 repository.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3777 // At this point verifiable setups are already checked
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3778 // and an optional MockException might be thrown.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3779 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3780 The following examples shows how to setup the repository with a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3781 default strict behavior, overriding that default for a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3782 specific mock:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3783 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3784 var repository = new MockRepository(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3785
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3786 // this particular one we want loose
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3787 var foo = repository.Create&lt;IFoo&gt;(MockBehavior.Loose);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3788 var bar = repository.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3789
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3790 // specify setups
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3791
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3792 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3793
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3794 repository.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3795 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3796 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3797 <seealso cref="T:Moq.MockBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3798 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3799 <member name="T:Moq.MockFactory">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3800 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3801 Utility factory class to use to construct multiple
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3802 mocks when consistent verification is
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3803 desired for all of them.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3804 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3805 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3806 If multiple mocks will be created during a test, passing
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3807 the desired <see cref="T:Moq.MockBehavior"/> (if different than the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3808 <see cref="F:Moq.MockBehavior.Default"/> or the one
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3809 passed to the factory constructor) and later verifying each
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3810 mock can become repetitive and tedious.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3811 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3812 This factory class helps in that scenario by providing a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3813 simplified creation of multiple mocks with a default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3814 <see cref="T:Moq.MockBehavior"/> (unless overriden by calling
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3815 <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/>) and posterior verification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3816 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3817 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3818 <example group="factory">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3819 The following is a straightforward example on how to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3820 create and automatically verify strict mocks using a <see cref="T:Moq.MockFactory"/>:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3821 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3822 var factory = new MockFactory(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3823
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3824 var foo = factory.Create&lt;IFoo&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3825 var bar = factory.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3826
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3827 // no need to call Verifiable() on the setup
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3828 // as we'll be validating all of them anyway.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3829 foo.Setup(f =&gt; f.Do());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3830 bar.Setup(b =&gt; b.Redo());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3831
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3832 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3833
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3834 factory.VerifyAll();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3835 // At this point all setups are already checked
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3836 // and an optional MockException might be thrown.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3837 // Note also that because the mocks are strict, any invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3838 // that doesn't have a matching setup will also throw a MockException.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3839 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3840 The following examples shows how to setup the factory
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3841 to create loose mocks and later verify only verifiable setups:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3842 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3843 var factory = new MockFactory(MockBehavior.Loose);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3844
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3845 var foo = factory.Create&lt;IFoo&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3846 var bar = factory.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3847
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3848 // this setup will be verified when we verify the factory
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3849 foo.Setup(f =&gt; f.Do()).Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3850
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3851 // this setup will NOT be verified
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3852 foo.Setup(f =&gt; f.Calculate());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3853
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3854 // this setup will be verified when we verify the factory
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3855 bar.Setup(b =&gt; b.Redo()).Verifiable();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3856
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3857 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3858 // note that because the mocks are Loose, members
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3859 // called in the interfaces for which no matching
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3860 // setups exist will NOT throw exceptions,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3861 // and will rather return default values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3862
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3863 factory.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3864 // At this point verifiable setups are already checked
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3865 // and an optional MockException might be thrown.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3866 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3867 The following examples shows how to setup the factory with a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3868 default strict behavior, overriding that default for a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3869 specific mock:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3870 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3871 var factory = new MockFactory(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3872
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3873 // this particular one we want loose
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3874 var foo = factory.Create&lt;IFoo&gt;(MockBehavior.Loose);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3875 var bar = factory.Create&lt;IBar&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3876
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3877 // specify setups
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3878
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3879 // exercise the mocks here
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3880
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3881 factory.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3882 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3883 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3884 <seealso cref="T:Moq.MockBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3885 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3886 <member name="M:Moq.MockFactory.#ctor(Moq.MockBehavior)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3887 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3888 Initializes the factory with the given <paramref name="defaultBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3889 for newly created mocks from the factory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3890 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3891 <param name="defaultBehavior">The behavior to use for mocks created
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3892 using the <see cref="M:Moq.MockFactory.Create``1"/> factory method if not overriden
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3893 by using the <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/> overload.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3894 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3895 <member name="M:Moq.MockFactory.Create``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3896 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3897 Creates a new mock with the default <see cref="T:Moq.MockBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3898 specified at factory construction time.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3899 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3900 <typeparam name="T">Type to mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3901 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3902 <example ignore="true">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3903 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3904 var factory = new MockFactory(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3905
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3906 var foo = factory.Create&lt;IFoo&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3907 // use mock on tests
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3908
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3909 factory.VerifyAll();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3910 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3911 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3912 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3913 <member name="M:Moq.MockFactory.Create``1(System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3914 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3915 Creates a new mock with the default <see cref="T:Moq.MockBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3916 specified at factory construction time and with the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3917 the given constructor arguments for the class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3918 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3919 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3920 The mock will try to find the best match constructor given the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3921 constructor arguments, and invoke that to initialize the instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3922 This applies only to classes, not interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3923 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3924 <typeparam name="T">Type to mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3925 <param name="args">Constructor arguments for mocked classes.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3926 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3927 <example ignore="true">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3928 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3929 var factory = new MockFactory(MockBehavior.Default);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3930
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3931 var mock = factory.Create&lt;MyBase&gt;("Foo", 25, true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3932 // use mock on tests
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3933
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3934 factory.Verify();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3935 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3936 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3937 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3938 <member name="M:Moq.MockFactory.Create``1(Moq.MockBehavior)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3939 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3940 Creates a new mock with the given <paramref name="behavior"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3941 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3942 <typeparam name="T">Type to mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3943 <param name="behavior">Behavior to use for the mock, which overrides
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3944 the default behavior specified at factory construction time.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3945 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3946 <example group="factory">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3947 The following example shows how to create a mock with a different
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3948 behavior to that specified as the default for the factory:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3949 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3950 var factory = new MockFactory(MockBehavior.Strict);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3951
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3952 var foo = factory.Create&lt;IFoo&gt;(MockBehavior.Loose);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3953 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3954 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3955 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3956 <member name="M:Moq.MockFactory.Create``1(Moq.MockBehavior,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3957 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3958 Creates a new mock with the given <paramref name="behavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3959 and with the the given constructor arguments for the class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3960 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3961 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3962 The mock will try to find the best match constructor given the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3963 constructor arguments, and invoke that to initialize the instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3964 This applies only to classes, not interfaces.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3965 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3966 <typeparam name="T">Type to mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3967 <param name="behavior">Behavior to use for the mock, which overrides
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3968 the default behavior specified at factory construction time.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3969 <param name="args">Constructor arguments for mocked classes.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3970 <returns>A new <see cref="T:Moq.Mock`1"/>.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3971 <example group="factory">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3972 The following example shows how to create a mock with a different
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3973 behavior to that specified as the default for the factory, passing
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3974 constructor arguments:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3975 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3976 var factory = new MockFactory(MockBehavior.Default);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3977
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3978 var mock = factory.Create&lt;MyBase&gt;(MockBehavior.Strict, "Foo", 25, true);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3979 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3980 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3981 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3982 <member name="M:Moq.MockFactory.CreateMock``1(Moq.MockBehavior,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3983 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3984 Implements creation of a new mock within the factory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3985 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3986 <typeparam name="T">Type to mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3987 <param name="behavior">The behavior for the new mock.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3988 <param name="args">Optional arguments for the construction of the mock.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3989 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3990 <member name="M:Moq.MockFactory.Verify">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3991 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3992 Verifies all verifiable expectations on all mocks created
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3993 by this factory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3994 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3995 <seealso cref="M:Moq.Mock.Verify"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3996 <exception cref="T:Moq.MockException">One or more mocks had expectations that were not satisfied.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3997 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3998 <member name="M:Moq.MockFactory.VerifyAll">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
3999 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4000 Verifies all verifiable expectations on all mocks created
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4001 by this factory.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4002 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4003 <seealso cref="M:Moq.Mock.Verify"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4004 <exception cref="T:Moq.MockException">One or more mocks had expectations that were not satisfied.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4005 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4006 <member name="M:Moq.MockFactory.VerifyMocks(System.Action{Moq.Mock})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4007 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4008 Invokes <paramref name="verifyAction"/> for each mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4009 in <see cref="P:Moq.MockFactory.Mocks"/>, and accumulates the resulting
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4010 <see cref="T:Moq.MockVerificationException"/> that might be
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4011 thrown from the action.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4012 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4013 <param name="verifyAction">The action to execute against
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4014 each mock.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4015 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4016 <member name="P:Moq.MockFactory.CallBase">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4017 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4018 Whether the base member virtual implementation will be called
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4019 for mocked classes if no setup is matched. Defaults to <see langword="false"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4020 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4021 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4022 <member name="P:Moq.MockFactory.DefaultValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4023 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4024 Specifies the behavior to use when returning default values for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4025 unexpected invocations on loose mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4026 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4027 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4028 <member name="P:Moq.MockFactory.Mocks">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4029 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4030 Gets the mocks that have been created by this factory and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4031 that will get verified together.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4032 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4033 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4034 <member name="M:Moq.MockRepository.Of``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4035 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4036 Access the universe of mocks of the given type, to retrieve those
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4037 that behave according to the LINQ query specification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4038 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4039 <typeparam name="T">The type of the mocked object to query.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4040 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4041 <member name="M:Moq.MockRepository.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4042 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4043 Access the universe of mocks of the given type, to retrieve those
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4044 that behave according to the LINQ query specification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4045 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4046 <param name="specification">The predicate with the setup expressions.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4047 <typeparam name="T">The type of the mocked object to query.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4048 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4049 <member name="M:Moq.MockRepository.OneOf``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4050 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4051 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4052 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4053 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4054 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4055 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4056 <member name="M:Moq.MockRepository.OneOf``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4057 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4058 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4059 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4060 <param name="specification">The predicate with the setup expressions.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4061 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4062 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4063 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4064 <member name="M:Moq.MockRepository.CreateMockQuery``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4065 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4066 Creates the mock query with the underlying queriable implementation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4067 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4068 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4069 <member name="M:Moq.MockRepository.CreateQueryable``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4070 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4071 Wraps the enumerator inside a queryable.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4072 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4073 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4074 <member name="M:Moq.MockRepository.CreateMocks``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4075 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4076 Method that is turned into the actual call from .Query{T}, to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4077 transform the queryable query into a normal enumerable query.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4078 This method is never used directly by consumers.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4079 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4080 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4081 <member name="M:Moq.MockRepository.#ctor(Moq.MockBehavior)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4082 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4083 Initializes the repository with the given <paramref name="defaultBehavior"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4084 for newly created mocks from the repository.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4085 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4086 <param name="defaultBehavior">The behavior to use for mocks created
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4087 using the <see cref="M:Moq.MockFactory.Create``1"/> repository method if not overriden
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4088 by using the <see cref="M:Moq.MockFactory.Create``1(Moq.MockBehavior)"/> overload.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4089 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4090 <member name="T:Moq.Mocks">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4091 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4092 Allows querying the universe of mocks for those that behave
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4093 according to the LINQ query specification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4094 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4095 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4096 This entry-point into Linq to Mocks is the only one in the root Moq
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4097 namespace to ease discovery. But to get all the mocking extension
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4098 methods on Object, a using of Moq.Linq must be done, so that the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4099 polluting of the intellisense for all objects is an explicit opt-in.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4100 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4101 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4102 <member name="M:Moq.Mocks.Of``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4103 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4104 Access the universe of mocks of the given type, to retrieve those
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4105 that behave according to the LINQ query specification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4106 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4107 <typeparam name="T">The type of the mocked object to query.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4108 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4109 <member name="M:Moq.Mocks.Of``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4110 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4111 Access the universe of mocks of the given type, to retrieve those
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4112 that behave according to the LINQ query specification.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4113 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4114 <param name="specification">The predicate with the setup expressions.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4115 <typeparam name="T">The type of the mocked object to query.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4116 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4117 <member name="M:Moq.Mocks.OneOf``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4118 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4119 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4120 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4121 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4122 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4123 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4124 <member name="M:Moq.Mocks.OneOf``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4125 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4126 Creates an mock object of the indicated type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4127 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4128 <param name="specification">The predicate with the setup expressions.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4129 <typeparam name="T">The type of the mocked object.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4130 <returns>The mocked object created.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4131 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4132 <member name="M:Moq.Mocks.CreateMockQuery``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4133 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4134 Creates the mock query with the underlying queriable implementation.
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.Mocks.CreateQueryable``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4138 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4139 Wraps the enumerator inside a queryable.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4140 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4141 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4142 <member name="M:Moq.Mocks.CreateMocks``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4143 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4144 Method that is turned into the actual call from .Query{T}, to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4145 transform the queryable query into a normal enumerable query.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4146 This method is never used directly by consumers.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4147 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4148 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4149 <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
4150 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4151 Extension method used to support Linq-like setup properties that are not virtual but do have
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4152 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
4153 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4154 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4155 <member name="T:Moq.QueryableMockExtensions">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4156 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4157 Helper extensions that are used by the query translator.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4158 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4159 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4160 <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
4161 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4162 Retrieves a fluent mock from the given setup expression.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4163 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4164 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4165 <member name="T:Moq.Match">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4166 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4167 Allows creation custom value matchers that can be used on setups and verification,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4168 completely replacing the built-in <see cref="T:Moq.It"/> class with your own argument
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4169 matching rules.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4170 </summary><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4171 See also <see cref="T:Moq.Match`1"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4172 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4173 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4174 <member name="M:Moq.Match.Matcher``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4175 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4176 Provided for the sole purpose of rendering the delegate passed to the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4177 matcher constructor if no friendly render lambda is provided.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4178 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4179 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4180 <member name="M:Moq.Match.Create``1(System.Predicate{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4181 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4182 Initializes the match with the condition that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4183 will be checked in order to match invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4184 values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4185 </summary><param name="condition">The condition to match against actual values.</param><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4186 <seealso cref="T:Moq.Match`1"/>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4187 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4188 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4189 <member name="M:Moq.Match.Create``1(System.Predicate{``0},System.Linq.Expressions.Expression{System.Func{``0}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4190 <!-- 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
4191 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4192 <member name="M:Moq.Match.SetLastMatch``1(Moq.Match{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4193 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4194 This method is used to set an expression as the last matcher invoked,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4195 which is used in the SetupSet to allow matchers in the prop = value
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4196 delegate expression. This delegate is executed in "fluent" mode in
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4197 order to capture the value being set, and construct the corresponding
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4198 methodcall.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4199 This is also used in the MatcherFactory for each argument expression.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4200 This method ensures that when we execute the delegate, we
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4201 also track the matcher that was invoked, so that when we create the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4202 methodcall we build the expression using it, rather than the null/default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4203 value returned from the actual invocation.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4204 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4205 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4206 <member name="T:Moq.Match`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4207 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4208 Allows creation custom value matchers that can be used on setups and verification,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4209 completely replacing the built-in <see cref="T:Moq.It"/> class with your own argument
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4210 matching rules.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4211 </summary><typeparam name="T">Type of the value to match.</typeparam><remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4212 The argument matching is used to determine whether a concrete
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4213 invocation in the mock matches a given setup. This
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4214 matching mechanism is fully extensible.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4215 </remarks><example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4216 Creating a custom matcher is straightforward. You just need to create a method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4217 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
4218 your matching condition and optional friendly render expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4219 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4220 [Matcher]
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4221 public Order IsBigOrder()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4222 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4223 return Match&lt;Order&gt;.Create(
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4224 o =&gt; o.GrandTotal &gt;= 5000,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4225 /* a friendly expression to render on failures */
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4226 () =&gt; IsBigOrder());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4227 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4228 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4229 This method can be used in any mock setup invocation:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4230 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4231 mock.Setup(m =&gt; m.Submit(IsBigOrder()).Throws&lt;UnauthorizedAccessException&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4232 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4233 At runtime, Moq knows that the return value was a matcher (note that the method MUST be
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4234 annotated with the [Matcher] attribute in order to determine this) and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4235 evaluates your predicate with the actual value passed into your predicate.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4236 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4237 Another example might be a case where you want to match a lists of orders
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4238 that contains a particular one. You might create matcher like the following:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4239 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4240 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4241 public static class Orders
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4242 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4243 [Matcher]
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4244 public static IEnumerable&lt;Order&gt; Contains(Order order)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4245 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4246 return Match&lt;IEnumerable&lt;Order&gt;&gt;.Create(orders =&gt; orders.Contains(order));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4247 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4248 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4249 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4250 Now we can invoke this static method instead of an argument in an
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4251 invocation:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4252 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4253 var order = new Order { ... };
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4254 var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4255
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4256 mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4257 .Throws&lt;ArgumentException&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4258 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4259 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4260 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4261 <member name="T:Moq.MatcherAttribute">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4262 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4263 Marks a method as a matcher, which allows complete replacement
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4264 of the built-in <see cref="T:Moq.It"/> class with your own argument
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4265 matching rules.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4266 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4267 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4268 <b>This feature has been deprecated in favor of the new
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4269 and simpler <see cref="T:Moq.Match`1"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4270 </b>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4271 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4272 The argument matching is used to determine whether a concrete
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4273 invocation in the mock matches a given setup. This
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4274 matching mechanism is fully extensible.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4275 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4276 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4277 There are two parts of a matcher: the compiler matcher
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4278 and the runtime matcher.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4279 <list type="bullet">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4280 <item>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4281 <term>Compiler matcher</term>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4282 <description>Used to satisfy the compiler requirements for the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4283 argument. Needs to be a method optionally receiving any arguments
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4284 you might need for the matching, but with a return type that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4285 matches that of the argument.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4286 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4287 Let's say I want to match a lists of orders that contains
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4288 a particular one. I might create a compiler matcher like the following:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4289 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4290 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4291 public static class Orders
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4292 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4293 [Matcher]
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4294 public static IEnumerable&lt;Order&gt; Contains(Order order)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4295 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4296 return null;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4297 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4298 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4299 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4300 Now we can invoke this static method instead of an argument in an
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4301 invocation:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4302 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4303 var order = new Order { ... };
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4304 var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4305
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4306 mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4307 .Throws&lt;ArgumentException&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4308 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4309 Note that the return value from the compiler matcher is irrelevant.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4310 This method will never be called, and is just used to satisfy the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4311 compiler and to signal Moq that this is not a method that we want
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4312 to be invoked at runtime.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4313 </description>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4314 </item>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4315 <item>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4316 <term>Runtime matcher</term>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4317 <description>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4318 The runtime matcher is the one that will actually perform evaluation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4319 when the test is run, and is defined by convention to have the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4320 same signature as the compiler matcher, but where the return
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4321 value is the first argument to the call, which contains the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4322 object received by the actual invocation at runtime:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4323 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4324 public static bool Contains(IEnumerable&lt;Order&gt; orders, Order order)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4325 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4326 return orders.Contains(order);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4327 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4328 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4329 At runtime, the mocked method will be invoked with a specific
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4330 list of orders. This value will be passed to this runtime
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4331 matcher as the first argument, while the second argument is the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4332 one specified in the setup (<c>x.Save(Orders.Contains(order))</c>).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4333 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4334 The boolean returned determines whether the given argument has been
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4335 matched. If all arguments to the expected method are matched, then
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4336 the setup matches and is evaluated.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4337 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4338 </description>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4339 </item>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4340 </list>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4341 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4342 Using this extensible infrastructure, you can easily replace the entire
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4343 <see cref="T:Moq.It"/> set of matchers with your own. You can also avoid the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4344 typical (and annoying) lengthy expressions that result when you have
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4345 multiple arguments that use generics.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4346 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4347 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4348 The following is the complete example explained above:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4349 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4350 public static class Orders
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4351 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4352 [Matcher]
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4353 public static IEnumerable&lt;Order&gt; Contains(Order order)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4354 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4355 return null;
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4356 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4357
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4358 public static bool Contains(IEnumerable&lt;Order&gt; orders, Order order)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4359 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4360 return orders.Contains(order);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4361 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4362 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4363 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4364 And the concrete test using this matcher:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4365 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4366 var order = new Order { ... };
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4367 var mock = new Mock&lt;IRepository&lt;Order&gt;&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4368
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4369 mock.Setup(x =&gt; x.Save(Orders.Contains(order)))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4370 .Throws&lt;ArgumentException&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4371
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4372 // use mock, invoke Save, and have the matcher filter.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4373 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4374 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4375 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4376 <member name="T:Moq.Matchers.MatcherAttributeMatcher">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4377 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4378 Matcher to treat static functions as matchers.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4379
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4380 mock.Setup(x => x.StringMethod(A.MagicString()));
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4381
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4382 public static class A
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4383 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4384 [Matcher]
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4385 public static string MagicString() { return null; }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4386 public static bool MagicString(string arg)
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4387 {
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4388 return arg == "magic";
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4389 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4390 }
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4391
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4392 Will succeed if: mock.Object.StringMethod("magic");
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4393 and fail with any other call.
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="T:Moq.MethodCallReturn">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4397 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4398 We need this non-generics base class so that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4399 we can use <see cref="P:Moq.MethodCallReturn.HasReturnValue"/> from
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4400 generic code.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4401 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4402 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4403 <member name="T:Moq.MockBehavior">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4404 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4405 Options to customize the behavior of the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4406 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4407 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4408 <member name="F:Moq.MockBehavior.Strict">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4409 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4410 Causes the mock to always throw
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4411 an exception for invocations that don't have a
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4412 corresponding setup.
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="F:Moq.MockBehavior.Loose">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4416 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4417 Will never throw exceptions, returning default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4418 values when necessary (null for reference types,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4419 zero for value types or empty enumerables and arrays).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4420 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4421 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4422 <member name="F:Moq.MockBehavior.Default">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4423 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4424 Default mock behavior, which equals <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4425 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4426 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4427 <member name="T:Moq.MockDefaultValueProvider">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4428 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4429 A <see cref="T:Moq.IDefaultValueProvider"/> that returns an empty default value
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4430 for non-mockeable types, and mocks for all other types (interfaces and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4431 non-sealed classes) that can be mocked.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4432 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4433 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4434 <member name="T:Moq.MockException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4435 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4436 Exception thrown by mocks when setups are not matched,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4437 the mock is not properly setup, etc.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4438 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4439 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4440 A distinct exception type is provided so that exceptions
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4441 thrown by the mock can be differentiated in tests that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4442 expect other exceptions to be thrown (i.e. ArgumentException).
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4443 <para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4444 Richer exception hierarchy/types are not provided as
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4445 tests typically should <b>not</b> catch or expect exceptions
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4446 from the mocks. These are typically the result of changes
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4447 in the tested class or its collaborators implementation, and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4448 result in fixes in the mock setup so that they dissapear and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4449 allow the test to pass.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4450 </para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4451 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4452 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4453 <member name="P:Moq.MockException.IsVerificationError">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4454 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4455 Indicates whether this exception is a verification fault raised by Verify()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4456 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4457 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4458 <member name="T:Moq.MockException.ExceptionReason">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4459 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4460 Made internal as it's of no use for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4461 consumers, but it's important for
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4462 our own tests.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4463 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4464 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4465 <member name="T:Moq.MockVerificationException">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4466 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4467 Used by the mock factory to accumulate verification
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4468 failures.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4469 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4470 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4471 <member name="T:Moq.MockSequence">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4472 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4473 Helper class to setup a full trace between many mocks
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="M:Moq.MockSequence.#ctor">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4477 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4478 Initialize a trace setup
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.MockSequence.Cyclic">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4482 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4483 Allow sequence to be repeated
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4484 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4485 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4486 <member name="T:Moq.MockSequenceHelper">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4487 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4488 define nice api
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4489 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4490 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4491 <member name="M:Moq.MockSequenceHelper.InSequence``1(Moq.Mock{``0},Moq.MockSequence)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4492 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4493 Perform an expectation in the trace.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4494 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4495 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4496 <member name="T:Moq.MockLegacyExtensions">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4497 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4498 Provides legacy API members as extensions so that
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4499 existing code continues to compile, but new code
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4500 doesn't see then.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4501 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4502 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4503 <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
4504 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4505 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4506 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4507 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4508 <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
4509 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4510 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4511 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4512 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4513 <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
4514 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4515 Obsolete.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4516 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4517 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4518 <member name="T:Moq.ObsoleteMockExtensions">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4519 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4520 Provides additional methods on mocks.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4521 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4522 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4523 Provided as extension methods as they confuse the compiler
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4524 with the overloads taking Action.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4525 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4526 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4527 <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
4528 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4529 Specifies a setup on the mocked type for a call to
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4530 to a property setter, regardless of its value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4531 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4532 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4533 If more than one setup is set for the same property setter,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4534 the latest one wins and is the one that will be executed.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4535 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4536 <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
4537 <typeparam name="T">Type of the mock.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4538 <param name="mock">The target mock for the setup.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4539 <param name="expression">Lambda expression that specifies the property setter.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4540 <example group="setups">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4541 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4542 mock.SetupSet(x =&gt; x.Suspended);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4543 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4544 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4545 <devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4546 This method is not legacy, but must be on an extension method to avoid
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4547 confusing the compiler with the new Action syntax.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4548 </devdoc>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4549 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4550 <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
4551 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4552 Verifies that a property has been set on the mock, regarless of its value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4553 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4554 <example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4555 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4556 and later we want to verify that a given invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4557 with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4558 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4559 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4560 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4561 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4562 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4563 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4564 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4565 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4566 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4567 <param name="expression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4568 <param name="mock">The mock instance.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4569 <typeparam name="T">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4570 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4571 be inferred from the expression's return type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4572 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4573 <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
4574 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4575 Verifies that a property has been set on the mock, specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4576 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4577 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4578 <example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4579 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4580 and later we want to verify that a given invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4581 with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4582 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4583 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4584 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4585 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4586 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4587 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4588 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4589 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4590 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4591 <param name="expression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4592 <param name="failMessage">Message to show if verification fails.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4593 <param name="mock">The mock instance.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4594 <typeparam name="T">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4595 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4596 be inferred from the expression's return type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4597 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4598 <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
4599 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4600 Verifies that a property has been set on the mock, regardless
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4601 of the value but only the specified number of times.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4602 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4603 <example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4604 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4605 and later we want to verify that a given invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4606 with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4607 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4608 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4609 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4610 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4611 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4612 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4613 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4614 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4615 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4616 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4617 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4618 <param name="mock">The mock instance.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4619 <typeparam name="T">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4620 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4621 <param name="expression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4622 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4623 be inferred from the expression's return type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4624 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4625 <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
4626 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4627 Verifies that a property has been set on the mock, regardless
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4628 of the value but only the specified number of times, and specifying a failure
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4629 error message.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4630 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4631 <example group="verification">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4632 This example assumes that the mock has been used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4633 and later we want to verify that a given invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4634 with specific parameters was performed:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4635 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4636 var mock = new Mock&lt;IWarehouse&gt;();
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4637 // exercise mock
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4638 //...
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4639 // Will throw if the test code didn't set the IsClosed property.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4640 mock.VerifySet(warehouse =&gt; warehouse.IsClosed);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4641 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4642 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4643 <exception cref="T:Moq.MockException">The invocation was not performed on the mock.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4644 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4645 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4646 <param name="mock">The mock instance.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4647 <typeparam name="T">Mocked type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4648 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4649 <param name="failMessage">Message to show if verification fails.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4650 <param name="expression">Expression to verify.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4651 <typeparam name="TProperty">Type of the property to verify. Typically omitted as it can
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4652 be inferred from the expression's return type.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4653 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4654 <member name="T:Moq.Protected.IProtectedMock`1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4655 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4656 Allows setups to be specified for protected members by using their
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4657 name as a string, rather than strong-typing them which is not possible
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4658 due to their visibility.
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="M:Moq.Protected.IProtectedMock`1.Setup(System.String,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4662 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4663 Specifies a setup for a void method invocation with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4664 <paramref name="voidMethodName"/>, optionally specifying arguments for the method call.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4665 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4666 <param name="voidMethodName">The name of the void method to be invoked.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4667 <param name="args">The optional arguments for the invocation. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4668 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4669 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4670 <member name="M:Moq.Protected.IProtectedMock`1.Setup``1(System.String,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4671 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4672 Specifies a setup for an invocation on a property or a non void method with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4673 <paramref name="methodOrPropertyName"/>, optionally specifying arguments for the method call.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4674 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4675 <param name="methodOrPropertyName">The name of the method or property to be invoked.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4676 <param name="args">The optional arguments for the invocation. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4677 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4678 <typeparam name="TResult">The return type of the method or property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4679 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4680 <member name="M:Moq.Protected.IProtectedMock`1.SetupGet``1(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4681 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4682 Specifies a setup for an invocation on a property getter with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4683 <paramref name="propertyName"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4684 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4685 <param name="propertyName">The name of the property.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4686 <typeparam name="TProperty">The type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4687 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4688 <member name="M:Moq.Protected.IProtectedMock`1.SetupSet``1(System.String,System.Object)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4689 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4690 Specifies a setup for an invocation on a property setter with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4691 <paramref name="propertyName"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4692 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4693 <param name="propertyName">The name of the property.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4694 <param name="value">The property value. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4695 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4696 <typeparam name="TProperty">The type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4697 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4698 <member name="M:Moq.Protected.IProtectedMock`1.Verify(System.String,Moq.Times,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4699 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4700 Specifies a verify for a void method with the given <paramref name="methodName"/>,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4701 optionally specifying arguments for the method call. Use in conjuntion with the default
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4702 <see cref="F:Moq.MockBehavior.Loose"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4703 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4704 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4705 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4706 <param name="methodName">The name of the void method to be verified.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4707 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4708 <param name="args">The optional arguments for the invocation. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4709 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4710 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4711 <member name="M:Moq.Protected.IProtectedMock`1.Verify``1(System.String,Moq.Times,System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4712 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4713 Specifies a verify for an invocation on a property or a non void method with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4714 <paramref name="methodName"/>, optionally specifying arguments for the method call.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4715 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4716 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4717 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4718 <param name="methodName">The name of the method or property to be invoked.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4719 <param name="args">The optional arguments for the invocation. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4720 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4721 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4722 <typeparam name="TResult">The type of return value from the expression.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4723 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4724 <member name="M:Moq.Protected.IProtectedMock`1.VerifyGet``1(System.String,Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4725 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4726 Specifies a verify for an invocation on a property getter with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4727 <paramref name="propertyName"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4728 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4729 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4730 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4731 <param name="propertyName">The name of the property.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4732 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4733 <typeparam name="TProperty">The type of the property.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4734 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4735 <member name="M:Moq.Protected.IProtectedMock`1.VerifySet``1(System.String,Moq.Times,System.Object)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4736 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4737 Specifies a setup for an invocation on a property setter with the given
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4738 <paramref name="propertyName"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4739 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4740 <exception cref="T:Moq.MockException">The invocation was not call the times specified by
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4741 <paramref name="times"/>.</exception>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4742 <param name="propertyName">The name of the property.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4743 <param name="times">The number of times a method is allowed to be called.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4744 <param name="value">The property value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4745 <typeparam name="TProperty">The type of the property. If argument matchers are used,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4746 remember to use <see cref="T:Moq.Protected.ItExpr"/> rather than <see cref="T:Moq.It"/>.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4747 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4748 <member name="T:Moq.Protected.ItExpr">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4749 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4750 Allows the specification of a matching condition for an
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4751 argument in a protected member setup, rather than a specific
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4752 argument value. "ItExpr" refers to the argument being matched.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4753 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4754 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4755 <para>Use this variant of argument matching instead of
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4756 <see cref="T:Moq.It"/> for protected setups.</para>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4757 This class allows the setup to match a method invocation
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4758 with an arbitrary value, with a value in a specified range, or
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4759 even one that matches a given predicate, or null.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4760 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4761 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4762 <member name="M:Moq.Protected.ItExpr.IsNull``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4763 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4764 Matches a null value of the given <typeparamref name="TValue"/> type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4765 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4766 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4767 Required for protected mocks as the null value cannot be used
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4768 directly as it prevents proper method overload selection.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4769 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4770 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4771 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4772 // Throws an exception for a call to Remove with a null string value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4773 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4774 .Setup("Remove", ItExpr.IsNull&lt;string&gt;())
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4775 .Throws(new InvalidOperationException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4776 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4777 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4778 <typeparam name="TValue">Type of the value.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4779 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4780 <member name="M:Moq.Protected.ItExpr.IsAny``1">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4781 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4782 Matches any value of the given <typeparamref name="TValue"/> type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4783 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4784 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4785 Typically used when the actual argument value for a method
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4786 call is not relevant.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4787 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4788 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4789 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4790 // Throws an exception for a call to Remove with any string value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4791 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4792 .Setup("Remove", ItExpr.IsAny&lt;string&gt;())
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4793 .Throws(new InvalidOperationException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4794 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4795 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4796 <typeparam name="TValue">Type of the value.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4797 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4798 <member name="M:Moq.Protected.ItExpr.Is``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4799 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4800 Matches any value that satisfies the given predicate.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4801 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4802 <typeparam name="TValue">Type of the argument to check.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4803 <param name="match">The predicate used to match the method argument.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4804 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4805 Allows the specification of a predicate to perform matching
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4806 of method call arguments.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4807 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4808 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4809 This example shows how to return the value <c>1</c> whenever the argument to the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4810 <c>Do</c> method is an even number.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4811 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4812 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4813 .Setup("Do", ItExpr.Is&lt;int&gt;(i =&gt; i % 2 == 0))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4814 .Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4815 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4816 This example shows how to throw an exception if the argument to the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4817 method is a negative number:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4818 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4819 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4820 .Setup("GetUser", ItExpr.Is&lt;int&gt;(i =&gt; i &lt; 0))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4821 .Throws(new ArgumentException());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4822 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4823 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4824 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4825 <member name="M:Moq.Protected.ItExpr.IsInRange``1(``0,``0,Moq.Range)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4826 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4827 Matches any value that is in the range specified.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4828 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4829 <typeparam name="TValue">Type of the argument to check.</typeparam>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4830 <param name="from">The lower bound of the range.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4831 <param name="to">The upper bound of the range.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4832 <param name="rangeKind">The kind of range. See <see cref="T:Moq.Range"/>.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4833 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4834 The following example shows how to expect a method call
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4835 with an integer argument within the 0..100 range.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4836 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4837 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4838 .Setup("HasInventory",
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4839 ItExpr.IsAny&lt;string&gt;(),
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4840 ItExpr.IsInRange(0, 100, Range.Inclusive))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4841 .Returns(false);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4842 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4843 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4844 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4845 <member name="M:Moq.Protected.ItExpr.IsRegex(System.String)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4846 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4847 Matches a string argument if it matches the given regular expression pattern.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4848 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4849 <param name="regex">The pattern to use to match the string argument value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4850 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4851 The following example shows how to expect a call to a method where the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4852 string argument matches the given regular expression:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4853 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4854 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4855 .Setup("Check", ItExpr.IsRegex("[a-z]+"))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4856 .Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4857 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4858 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4859 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4860 <member name="M:Moq.Protected.ItExpr.IsRegex(System.String,System.Text.RegularExpressions.RegexOptions)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4861 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4862 Matches a string argument if it matches the given regular expression pattern.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4863 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4864 <param name="regex">The pattern to use to match the string argument value.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4865 <param name="options">The options used to interpret the pattern.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4866 <example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4867 The following example shows how to expect a call to a method where the
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4868 string argument matches the given regular expression, in a case insensitive way:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4869 <code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4870 mock.Protected()
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4871 .Setup("Check", ItExpr.IsRegex("[a-z]+", RegexOptions.IgnoreCase))
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4872 .Returns(1);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4873 </code>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4874 </example>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4875 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4876 <member name="T:Moq.Protected.ProtectedExtension">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4877 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4878 Enables the <c>Protected()</c> method on <see cref="T:Moq.Mock`1"/>,
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4879 allowing setups to be set for protected members by using their
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4880 name as a string, rather than strong-typing them which is not possible
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4881 due to their visibility.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4882 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4883 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4884 <member name="M:Moq.Protected.ProtectedExtension.Protected``1(Moq.Mock{``0})">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4885 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4886 Enable protected setups for the mock.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4887 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4888 <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
4889 <param name="mock">The mock to set the protected setups on.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4890 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4891 <member name="T:ThisAssembly">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4892 <group name="overview" title="Overview" order="0" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4893 <group name="setups" title="Specifying setups" order="1" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4894 <group name="returns" title="Returning values from members" order="2" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4895 <group name="verification" title="Verifying setups" order="3" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4896 <group name="advanced" title="Advanced scenarios" order="99" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4897 <group name="factory" title="Using MockFactory for consistency across mocks" order="4" />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4898 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4899 <member name="T:Moq.Properties.Resources">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4900 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4901 A strongly-typed resource class, for looking up localized strings, etc.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4902 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4903 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4904 <member name="P:Moq.Properties.Resources.ResourceManager">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4905 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4906 Returns the cached ResourceManager instance used by this class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4907 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4908 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4909 <member name="P:Moq.Properties.Resources.Culture">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4910 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4911 Overrides the current thread's CurrentUICulture property for all
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4912 resource lookups using this strongly typed resource class.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4913 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4914 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4915 <member name="P:Moq.Properties.Resources.AlreadyInitialized">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4916 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4917 Looks up a localized string similar to Mock type has already been initialized by accessing its Object property. Adding interfaces must be done before that..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4918 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4919 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4920 <member name="P:Moq.Properties.Resources.ArgumentCannotBeEmpty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4921 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4922 Looks up a localized string similar to Value cannot be an empty string..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4923 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4924 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4925 <member name="P:Moq.Properties.Resources.AsMustBeInterface">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4926 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4927 Looks up a localized string similar to Can only add interfaces to the mock..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4928 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4929 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4930 <member name="P:Moq.Properties.Resources.CantSetReturnValueForVoid">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4931 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4932 Looks up a localized string similar to Can&apos;t set return value for void method {0}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4933 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4934 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4935 <member name="P:Moq.Properties.Resources.ConstructorArgsForDelegate">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4936 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4937 Looks up a localized string similar to Constructor arguments cannot be passed for delegate mocks..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4938 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4939 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4940 <member name="P:Moq.Properties.Resources.ConstructorArgsForInterface">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4941 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4942 Looks up a localized string similar to Constructor arguments cannot be passed for interface mocks..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4943 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4944 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4945 <member name="P:Moq.Properties.Resources.ConstructorNotFound">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4946 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4947 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
4948 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4949 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4950 <member name="P:Moq.Properties.Resources.EventNofFound">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4951 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4952 Looks up a localized string similar to Could not locate event for attach or detach method {0}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4953 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4954 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4955 <member name="P:Moq.Properties.Resources.FieldsNotSupported">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4956 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4957 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
4958 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4959 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4960 <member name="P:Moq.Properties.Resources.InvalidMockClass">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4961 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4962 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
4963 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4964 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4965 <member name="P:Moq.Properties.Resources.InvalidMockGetType">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4966 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4967 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
4968 Please cast the argument to one of the supported types: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4969 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
4970 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4971 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4972 <member name="P:Moq.Properties.Resources.LinqBinaryOperatorNotSupported">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4973 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4974 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
4975 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4976 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4977 <member name="P:Moq.Properties.Resources.LinqMethodNotSupported">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4978 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4979 Looks up a localized string similar to LINQ method &apos;{0}&apos; not supported..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4980 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4981 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4982 <member name="P:Moq.Properties.Resources.LinqMethodNotVirtual">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4983 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4984 Looks up a localized string similar to Expression contains a call to a method which is not virtual (overridable in VB) or abstract. Unsupported expression: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4985 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4986 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4987 <member name="P:Moq.Properties.Resources.MemberMissing">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4988 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4989 Looks up a localized string similar to Member {0}.{1} does not exist..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4990 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4991 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4992 <member name="P:Moq.Properties.Resources.MethodIsPublic">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4993 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4994 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
4995 mock.Setup(x =&gt; x.{1}());
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4996 .
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4997 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4998 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
4999 <member name="P:Moq.Properties.Resources.MockExceptionMessage">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5000 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5001 Looks up a localized string similar to {0} invocation failed with mock behavior {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5002 {2}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5003 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5004 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5005 <member name="P:Moq.Properties.Resources.MoreThanNCalls">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5006 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5007 Looks up a localized string similar to Expected only {0} calls to {1}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5008 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5009 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5010 <member name="P:Moq.Properties.Resources.MoreThanOneCall">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5011 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5012 Looks up a localized string similar to Expected only one call to {0}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5013 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5014 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5015 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtLeast">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5016 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5017 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5018 Expected invocation on the mock at least {2} times, but was {4} times: {1}.
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="P:Moq.Properties.Resources.NoMatchingCallsAtLeastOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5022 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5023 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5024 Expected invocation on the mock at least once, but was never performed: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5025 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5026 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5027 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtMost">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5028 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5029 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5030 Expected invocation on the mock at most {3} times, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5031 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5032 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5033 <member name="P:Moq.Properties.Resources.NoMatchingCallsAtMostOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5034 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5035 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5036 Expected invocation on the mock at most once, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5037 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5038 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5039 <member name="P:Moq.Properties.Resources.NoMatchingCallsBetweenExclusive">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5040 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5041 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5042 Expected invocation on the mock between {2} and {3} times (Exclusive), but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5043 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5044 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5045 <member name="P:Moq.Properties.Resources.NoMatchingCallsBetweenInclusive">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5046 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5047 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5048 Expected invocation on the mock between {2} and {3} times (Inclusive), but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5049 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5050 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5051 <member name="P:Moq.Properties.Resources.NoMatchingCallsExactly">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5052 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5053 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5054 Expected invocation on the mock exactly {2} times, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5055 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5056 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5057 <member name="P:Moq.Properties.Resources.NoMatchingCallsNever">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5058 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5059 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5060 Expected invocation on the mock should never have been performed, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5061 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5062 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5063 <member name="P:Moq.Properties.Resources.NoMatchingCallsOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5064 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5065 Looks up a localized string similar to {0}
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5066 Expected invocation on the mock once, but was {4} times: {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5067 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5068 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5069 <member name="P:Moq.Properties.Resources.NoSetup">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5070 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5071 Looks up a localized string similar to All invocations on the mock must have a corresponding setup..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5072 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5073 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5074 <member name="P:Moq.Properties.Resources.ObjectInstanceNotMock">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5075 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5076 Looks up a localized string similar to Object instance was not created by Moq..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5077 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5078 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5079 <member name="P:Moq.Properties.Resources.OutExpressionMustBeConstantValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5080 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5081 Looks up a localized string similar to Out expression must evaluate to a constant value..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5082 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5083 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5084 <member name="P:Moq.Properties.Resources.PropertyGetNotFound">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5085 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5086 Looks up a localized string similar to Property {0}.{1} does not have a getter..
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="P:Moq.Properties.Resources.PropertyMissing">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5090 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5091 Looks up a localized string similar to Property {0}.{1} does not exist..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5092 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5093 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5094 <member name="P:Moq.Properties.Resources.PropertyNotReadable">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5095 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5096 Looks up a localized string similar to Property {0}.{1} is write-only..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5097 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5098 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5099 <member name="P:Moq.Properties.Resources.PropertyNotWritable">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5100 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5101 Looks up a localized string similar to Property {0}.{1} is read-only..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5102 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5103 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5104 <member name="P:Moq.Properties.Resources.PropertySetNotFound">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5105 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5106 Looks up a localized string similar to Property {0}.{1} does not have a setter..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5107 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5108 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5109 <member name="P:Moq.Properties.Resources.RaisedUnassociatedEvent">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5110 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5111 Looks up a localized string similar to Cannot raise a mocked event unless it has been associated (attached) to a concrete event in a mocked object..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5112 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5113 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5114 <member name="P:Moq.Properties.Resources.RefExpressionMustBeConstantValue">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5115 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5116 Looks up a localized string similar to Ref expression must evaluate to a constant value..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5117 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5118 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5119 <member name="P:Moq.Properties.Resources.ReturnValueRequired">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5120 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5121 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
5122 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5123 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5124 <member name="P:Moq.Properties.Resources.SetupLambda">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5125 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5126 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
5127 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5128 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5129 <member name="P:Moq.Properties.Resources.SetupNever">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5130 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5131 Looks up a localized string similar to Invocation {0} should not have been made..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5132 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5133 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5134 <member name="P:Moq.Properties.Resources.SetupNotMethod">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5135 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5136 Looks up a localized string similar to Expression is not a method invocation: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5137 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5138 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5139 <member name="P:Moq.Properties.Resources.SetupNotProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5140 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5141 Looks up a localized string similar to Expression is not a property access: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5142 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5143 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5144 <member name="P:Moq.Properties.Resources.SetupNotSetter">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5145 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5146 Looks up a localized string similar to Expression is not a property setter invocation..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5147 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5148 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5149 <member name="P:Moq.Properties.Resources.SetupOnNonMemberMethod">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5150 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5151 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
5152 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5153 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5154 <member name="P:Moq.Properties.Resources.SetupOnNonOverridableMember">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5155 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5156 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
5157 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5158 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5159 <member name="P:Moq.Properties.Resources.TypeNotImplementInterface">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5160 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5161 Looks up a localized string similar to Type {0} does not implement required interface {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5162 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5163 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5164 <member name="P:Moq.Properties.Resources.TypeNotInheritFromType">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5165 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5166 Looks up a localized string similar to Type {0} does not from required type {1}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5167 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5168 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5169 <member name="P:Moq.Properties.Resources.UnexpectedPublicProperty">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5170 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5171 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
5172 mock.Setup(x =&gt; x.{1}).Returns(value);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5173 mock.SetupGet(x =&gt; x.{1}).Returns(value); //equivalent to previous one
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5174 mock.SetupSet(x =&gt; x.{1}).Callback(callbackDelegate);
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5175 .
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5176 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5177 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5178 <member name="P:Moq.Properties.Resources.UnsupportedExpression">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5179 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5180 Looks up a localized string similar to Unsupported expression: {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5181 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5182 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5183 <member name="P:Moq.Properties.Resources.UnsupportedIntermediateExpression">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5184 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5185 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
5186 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5187 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5188 <member name="P:Moq.Properties.Resources.UnsupportedIntermediateType">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5189 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5190 Looks up a localized string similar to Expression contains intermediate property access {0}.{1} which is of type {2} and cannot be mocked. Unsupported expression {3}..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5191 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5192 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5193 <member name="P:Moq.Properties.Resources.UnsupportedMatcherParamsForSetter">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5194 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5195 Looks up a localized string similar to Setter expression cannot use argument matchers that receive parameters..
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="P:Moq.Properties.Resources.UnsupportedMember">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5199 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5200 Looks up a localized string similar to Member {0} is not supported for protected mocking..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5201 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5202 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5203 <member name="P:Moq.Properties.Resources.UnsupportedNonStaticMatcherForSetter">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5204 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5205 Looks up a localized string similar to Setter expression can only use static custom matchers..
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5206 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5207 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5208 <member name="P:Moq.Properties.Resources.VerficationFailed">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5209 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5210 Looks up a localized string similar to The following setups were not matched:
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5211 {0}.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5212 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5213 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5214 <member name="P:Moq.Properties.Resources.VerifyOnNonVirtualMember">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5215 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5216 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
5217 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5218 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5219 <member name="M:Moq.Proxy.IProxyFactory.GetDelegateProxyInterface(System.Type,System.Reflection.MethodInfo@)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5220 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5221 Gets an autogenerated interface with a method on it that matches the signature of the specified
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5222 <paramref name="delegateType"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5223 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5224 <remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5225 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
5226 This is how we support delegate mocking. The factory caches such interfaces and reuses them
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5227 for repeated requests for the same delegate type.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5228 </remarks>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5229 <param name="delegateType">The delegate type for which an interface is required.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5230 <param name="delegateInterfaceMethod">The method on the autogenerated interface.</param>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5231 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5232 <member name="M:Moq.Proxy.CastleProxyFactory.CreateProxy(System.Type,Moq.Proxy.ICallInterceptor,System.Type[],System.Object[])">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5233 <inheritdoc />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5234 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5235 <member name="M:Moq.Proxy.CastleProxyFactory.GetDelegateProxyInterface(System.Type,System.Reflection.MethodInfo@)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5236 <inheritdoc />
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5237 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5238 <member name="T:Moq.Range">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5239 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5240 Kind of range to use in a filter specified through
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5241 <see cref="M:Moq.It.IsInRange``1(``0,``0,Moq.Range)"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5242 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5243 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5244 <member name="F:Moq.Range.Inclusive">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5245 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5246 The range includes the <c>to</c> and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5247 <c>from</c> values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5248 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5249 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5250 <member name="F:Moq.Range.Exclusive">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5251 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5252 The range does not include the <c>to</c> and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5253 <c>from</c> values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5254 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5255 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5256 <member name="T:Moq.SequenceExtensions">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5257 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5258 Helper for sequencing return values in the same method.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5259 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5260 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5261 <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
5262 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5263 Return a sequence of values, once per call.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5264 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5265 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5266 <member name="T:Moq.Times">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5267 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5268 Defines the number of invocations allowed by a mocked method.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5269 </summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5270 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5271 <member name="M:Moq.Times.AtLeast(System.Int32)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5272 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5273 Specifies that a mocked method should be invoked <paramref name="callCount"/> times as minimum.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5274 </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
5275 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5276 <member name="M:Moq.Times.AtLeastOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5277 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5278 Specifies that a mocked method should be invoked one time as minimum.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5279 </summary><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5280 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5281 <member name="M:Moq.Times.AtMost(System.Int32)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5282 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5283 Specifies that a mocked method should be invoked <paramref name="callCount"/> time as maximun.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5284 </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
5285 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5286 <member name="M:Moq.Times.AtMostOnce">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5287 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5288 Specifies that a mocked method should be invoked one time as maximun.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5289 </summary><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5290 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5291 <member name="M:Moq.Times.Between(System.Int32,System.Int32,Moq.Range)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5292 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5293 Specifies that a mocked method should be invoked between <paramref name="callCountFrom"/> and
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5294 <paramref name="callCountTo"/> times.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5295 </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
5296 The kind of range. See <see cref="T:Moq.Range"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5297 </param><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5298 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5299 <member name="M:Moq.Times.Exactly(System.Int32)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5300 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5301 Specifies that a mocked method should be invoked exactly <paramref name="callCount"/> times.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5302 </summary><param name="callCount">The times that a method or property can be called.</param><returns>An object defining the allowed number of invocations.</returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5303 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5304 <member name="M:Moq.Times.Never">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5305 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5306 Specifies that a mocked method should not be invoked.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5307 </summary><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.Once">
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 exactly one time.
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.Equals(System.Object)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5315 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5316 Determines whether the specified <see cref="T:System.Object"/> is equal to this instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5317 </summary><param name="obj">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5318 The <see cref="T:System.Object"/> to compare with this instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5319 </param><returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5320 <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
5321 </returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5322 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5323 <member name="M:Moq.Times.GetHashCode">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5324 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5325 Returns a hash code for this instance.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5326 </summary><returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5327 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
5328 </returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5329 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5330 <member name="M:Moq.Times.op_Equality(Moq.Times,Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5331 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5332 Determines whether two specified <see cref="T:Moq.Times"/> objects have the same value.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5333 </summary><param name="left">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5334 The first <see cref="T:Moq.Times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5335 </param><param name="right">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5336 The second <see cref="T:Moq.Times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5337 </param><returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5338 <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
5339 </returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5340 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5341 <member name="M:Moq.Times.op_Inequality(Moq.Times,Moq.Times)">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5342 <summary>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5343 Determines whether two specified <see cref="T:Moq.Times"/> objects have different values.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5344 </summary><param name="left">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5345 The first <see cref="T:Moq.Times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5346 </param><param name="right">
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5347 The second <see cref="T:Moq.Times"/>.
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5348 </param><returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5349 <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
5350 </returns>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5351 </member>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5352 </members>
5bca2d201ad8 initial commit
cin
parents:
diff changeset
5353 </doc>