VerifySet(TProperty) Method

Moq

Collapse imageExpand ImageCopy imageCopyHover image
Specifies a setup for an invocation on a property setter with the given propertyName.

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

Syntax

C#
void VerifySet<TProperty>(
	string propertyName,
	Times times,
	Object value
)

Parameters

propertyName
Type: System..::..String
The name of the property.
times
Type: Moq..::..Times
The number of times a method is allowed to be called.
value
Type: System..::..Object
The property value.

Type Parameters

TProperty
The type of the property. If argument matchers are used, remember to use ItExpr rather than It.

Exceptions

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

See Also