Verifies that a property was read on the mock.

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

Syntax

C#
public void VerifyGet<TProperty>(
	Expression<Func<T, TProperty>> expression,
	Times times
)

Parameters

expression
Type: Expression<(Of <(Func<(Of <(T, TProperty>)>)>)>)
Expression to verify.
times
Type: Moq..::.Times
The number of times a method is allowed to be called.

Type Parameters

TProperty
Type of the property to verify. Typically omitted as it can be inferred from the expression's return type.

Exceptions

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

See Also