VerifySet Method (Action(T), Times, String)

Moq

Collapse imageExpand ImageCopy imageCopyHover image
Verifies that a property was set on the mock, specifying a failure message.

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

Syntax

C#
public void VerifySet(
	Action<T> setterExpression,
	Times times,
	string failMessage
)

Parameters

setterExpression
Type: System..::..Action<(Of <(<'T>)>)>
Expression to verify.
times
Type: Moq..::..Times
The number of times a method is allowed to be called.
failMessage
Type: System..::..String
Message to show if verification fails.

Exceptions

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

See Also