Moq |
IReturnsGetter<(Of <(<'TMock, TProperty>)>)>..::..Returns Method (TProperty) |
IReturnsGetter<(Of <(<'TMock, TProperty>)>)> Interface Example See Also Send Feedback |
Specifies the value to return.
Namespace: Moq.Language
Assembly: Moq (in Moq.dll) Version: 4.0.10827.0 (4.0.0.0)
Syntax
C# |
---|
IReturnsResult<TMock> Returns( TProperty value ) |
Parameters
- value
- Type: TProperty
The value to return, or nullNothingnullptra null reference (Nothing in Visual Basic).
Examples
Return a true value from the property getter call:
CopyC#
mock.SetupGet(x => x.Suspended)
.Returns(true);