|
| Moq |
| ICallbackGetter<(Of <(TProperty>)>)..::.Callback Method |
| ICallbackGetter<(Of <(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: 2.6.1014.1 (2.6.0.0)
Syntax
| C# |
|---|
IReturnsThrowsGetter<TProperty> Callback( Action callback ) |
Parameters
- callback
- Type: Action
Callback method to invoke.
Examples
Invokes the given callback with the property value being set.
CopyC#
mock.ExpectGet(x => x.Suspended)
.Callback(() => called = true)
.Returns(true);