22// All rights reserved. Licensed under the BSD 3-Clause License; see License.txt.
33
44using System ;
5+ using System . Collections . Generic ;
56using System . ComponentModel ;
67
78using Moq . Language ;
@@ -182,7 +183,8 @@ IProtectedAsMock<TMock, TAnalog> As<TAnalog>()
182183 /// <param name="times">The number of times a method is allowed to be called.</param>
183184 /// <param name="args">The optional arguments for the invocation. If argument matchers are used,
184185 /// remember to use <see cref="ItExpr"/> rather than <see cref="It"/>.</param>
185- void Verify ( string methodName , Times times , params object [ ] args ) ;
186+ /// <returns>A list of matching invocations</returns>
187+ IVerifyResult < TMock > Verify ( string methodName , Times times , params object [ ] args ) ;
186188
187189 /// <summary>
188190 /// Specifies a verify for a void method with the given <paramref name="methodName"/>,
@@ -196,7 +198,8 @@ IProtectedAsMock<TMock, TAnalog> As<TAnalog>()
196198 /// <param name="times">The number of times a method is allowed to be called.</param>
197199 /// <param name="args">The optional arguments for the invocation. If argument matchers are used,
198200 /// remember to use <see cref="ItExpr"/> rather than <see cref="It"/>.</param>
199- void Verify ( string methodName , Type [ ] genericTypeArguments , Times times , params object [ ] args ) ;
201+ /// <returns>A list of matching invocations</returns>
202+ IVerifyResult < TMock > Verify ( string methodName , Type [ ] genericTypeArguments , Times times , params object [ ] args ) ;
200203
201204 /// <summary>
202205 /// Specifies a verify for a void method with the given <paramref name="methodName"/>,
@@ -210,7 +213,8 @@ IProtectedAsMock<TMock, TAnalog> As<TAnalog>()
210213 /// <param name="exactParameterMatch">Should the parameter types match exactly types that were provided</param>
211214 /// <param name="args">The optional arguments for the invocation. If argument matchers are used,
212215 /// remember to use <see cref="ItExpr"/> rather than <see cref="It"/>.</param>
213- void Verify ( string methodName , Times times , bool exactParameterMatch , params object [ ] args ) ;
216+ /// <returns>A list of matching invocations</returns>
217+ IVerifyResult < TMock > Verify ( string methodName , Times times , bool exactParameterMatch , params object [ ] args ) ;
214218
215219 /// <summary>
216220 /// Specifies a verify for a void method with the given <paramref name="methodName"/>,
@@ -225,7 +229,8 @@ IProtectedAsMock<TMock, TAnalog> As<TAnalog>()
225229 /// <param name="exactParameterMatch">Should the parameter types match exactly types that were provided</param>
226230 /// <param name="args">The optional arguments for the invocation. If argument matchers are used,
227231 /// remember to use <see cref="ItExpr"/> rather than <see cref="It"/>.</param>
228- void Verify ( string methodName , Type [ ] genericTypeArguments , Times times , bool exactParameterMatch , params object [ ] args ) ;
232+ /// <returns>A list of matching invocations</returns>
233+ IVerifyResult < TMock > Verify ( string methodName , Type [ ] genericTypeArguments , Times times , bool exactParameterMatch , params object [ ] args ) ;
229234
230235 /// <summary>
231236 /// Specifies a verify for an invocation on a property or a non void method with the given
@@ -238,7 +243,8 @@ IProtectedAsMock<TMock, TAnalog> As<TAnalog>()
238243 /// remember to use <see cref="ItExpr"/> rather than <see cref="It"/>.</param>
239244 /// <param name="times">The number of times a method is allowed to be called.</param>
240245 /// <typeparam name="TResult">The type of return value from the expression.</typeparam>
241- void Verify < TResult > ( string methodName , Times times , params object [ ] args ) ;
246+ /// <returns>A list of matching invocations</returns>
247+ IVerifyResult < TMock > Verify < TResult > ( string methodName , Times times , params object [ ] args ) ;
242248
243249 /// <summary>
244250 /// Specifies a verify for an invocation on a property or a non void method with the given
@@ -252,7 +258,8 @@ IProtectedAsMock<TMock, TAnalog> As<TAnalog>()
252258 /// remember to use <see cref="ItExpr"/> rather than <see cref="It"/>.</param>
253259 /// <param name="times">The number of times a method is allowed to be called.</param>
254260 /// <typeparam name="TResult">The type of return value from the expression.</typeparam>
255- void Verify < TResult > ( string methodName , Type [ ] genericTypeArguments , Times times , params object [ ] args ) ;
261+ /// <returns>A list of matching invocations</returns>
262+ IVerifyResult < TMock > Verify < TResult > ( string methodName , Type [ ] genericTypeArguments , Times times , params object [ ] args ) ;
256263
257264 /// <summary>
258265 /// Specifies a verify for an invocation on a property or a non void method with the given
@@ -266,7 +273,8 @@ IProtectedAsMock<TMock, TAnalog> As<TAnalog>()
266273 /// remember to use <see cref="ItExpr"/> rather than <see cref="It"/>.</param>
267274 /// <param name="times">The number of times a method is allowed to be called.</param>
268275 /// <typeparam name="TResult">The type of return value from the expression.</typeparam>
269- void Verify < TResult > ( string methodName , Times times , bool exactParameterMatch , params object [ ] args ) ;
276+ /// <returns>A list of matching invocations</returns>
277+ IVerifyResult < TMock > Verify < TResult > ( string methodName , Times times , bool exactParameterMatch , params object [ ] args ) ;
270278
271279 /// <summary>
272280 /// Specifies a verify for an invocation on a property or a non void method with the given
@@ -281,7 +289,8 @@ IProtectedAsMock<TMock, TAnalog> As<TAnalog>()
281289 /// remember to use <see cref="ItExpr"/> rather than <see cref="It"/>.</param>
282290 /// <param name="times">The number of times a method is allowed to be called.</param>
283291 /// <typeparam name="TResult">The type of return value from the expression.</typeparam>
284- void Verify < TResult > ( string methodName , Type [ ] genericTypeArguments , Times times , bool exactParameterMatch , params object [ ] args ) ;
292+ /// <returns>A list of matching invocations</returns>
293+ IVerifyResult < TMock > Verify < TResult > ( string methodName , Type [ ] genericTypeArguments , Times times , bool exactParameterMatch , params object [ ] args ) ;
285294
286295 /// <summary>
287296 /// Specifies a verify for an invocation on a property getter with the given
@@ -292,8 +301,9 @@ IProtectedAsMock<TMock, TAnalog> As<TAnalog>()
292301 /// <param name="propertyName">The name of the property.</param>
293302 /// <param name="times">The number of times a method is allowed to be called.</param>
294303 /// <typeparam name="TProperty">The type of the property.</typeparam>
304+ /// <returns>A list of matching invocations</returns>
295305 // TODO should receive args to support indexers
296- void VerifyGet < TProperty > ( string propertyName , Times times ) ;
306+ IVerifyResult < TMock > VerifyGet < TProperty > ( string propertyName , Times times ) ;
297307
298308 /// <summary>
299309 /// Specifies a setup for an invocation on a property setter with the given
@@ -306,8 +316,9 @@ IProtectedAsMock<TMock, TAnalog> As<TAnalog>()
306316 /// <param name="value">The property value.</param>
307317 /// <typeparam name="TProperty">The type of the property. If argument matchers are used,
308318 /// remember to use <see cref="ItExpr"/> rather than <see cref="It"/>.</typeparam>
319+ /// <returns>A list of matching invocations</returns>
309320 // TODO should receive args to support indexers
310- void VerifySet < TProperty > ( string propertyName , Times times , object value ) ;
321+ IVerifyResult < TMock > VerifySet < TProperty > ( string propertyName , Times times , object value ) ;
311322
312323 #endregion
313324 }
0 commit comments