This namespace defines the interfaces that contain the methods available in Moq fluent API, such as Setup, Callback, Returns, Throws, etc.
Review the documentation of the available methods on these interfaces for code examples. The way these interfaces are composed, grouped and made visible at different stages during an expectation (i.e. Verifiable is the last "verb" and can't be specified before the Returns) is internal but the API will naturally lead you to the proper way of using it, so don't worry too much about who (and where) exposes these language interfaces. They will show up in Intellisense when it's appropriate.
Do use their documentation to learn about options (especially when there are several overloads available) that may be a better fit for a particular scenario.
Interfaces
Interface | Description | |
---|---|---|
ICallback |
Defines the Callback verb and overloads.
| |
ICallback<(Of <(<'TMock, TResult>)>)> |
Defines the Callback verb and overloads for callbacks on
setups that return a value.
| |
ICallbackGetter<(Of <(<'TMock, TProperty>)>)> |
Defines the Callback verb for property getter setups.
| |
ICallbackSetter<(Of <(<'TProperty>)>)> |
Defines the Callback verb for property setter setups.
| |
IRaise<(Of <(<'T>)>)> |
Defines the Raises verb.
| |
IReturns<(Of <(<'TMock, TResult>)>)> |
Defines the Returns verb.
| |
IReturnsGetter<(Of <(<'TMock, TProperty>)>)> |
Defines the Returns verb for property get setups.
| |
ISetupConditionResult<(Of <(<'T>)>)> |
Implements the fluent API.
| |
ISetupSequentialResult<(Of <(<'TResult>)>)> |
Language for ReturnSequence
| |
IThrows |
Defines the Throws verb.
| |
IVerifies |
Defines the Verifiable verb.
|