|
| Moq |
| ICallbackGetter<(Of <(<'TMock, TProperty>)>)>..::..Callback Method |
| ICallbackGetter<(Of <(<'TMock, TProperty>)>)> Interface Example See Also Send Feedback |
Specifies a callback to invoke when the property is retrieved.
Namespace: Moq.Language
Assembly: Moq (in Moq.dll) Version: 4.0.10827.0 (4.0.0.0)
Syntax
| C# |
|---|
IReturnsThrowsGetter<TMock, TProperty> Callback( Action action ) |
Parameters
- action
- Type: System..::..Action
Callback method to invoke.
Examples
Invokes the given callback with the property value being set.
CopyC#
CopyC#mock.SetupGet(x => x.Suspended)
.Callback(() => called = true)
.Returns(true);