Verify(TResult) Method (String, Times, Object[])

Moq

Collapse imageExpand ImageCopy imageCopyHover image
Specifies a verify for an invocation on a property or a non void method with the given methodName, optionally specifying arguments for the method call.

Namespace: Moq.Protected
Assembly: Moq (in Moq.dll) Version: 4.0.10827.0 (4.0.0.0)

Syntax

C#
void Verify<TResult>(
	string methodName,
	Times times,
	params Object[] args
)

Parameters

methodName
Type: System..::..String
The name of the method or property to be invoked.
times
Type: Moq..::..Times
The number of times a method is allowed to be called.
args
Type: array<System..::..Object>[]()[][]
The optional arguments for the invocation. If argument matchers are used, remember to use ItExpr rather than It.

Type Parameters

TResult
The type of return value from the expression.

Exceptions

ExceptionCondition
Moq..::..MockExceptionThe invocation was not call the times specified by times.

See Also