[This is preliminary documentation and is subject to change.]
Assembly: Moq (in Moq)
Version: 1.5.2951.38938 (1.5.0.0)
Syntax
| C# |
|---|
public interface ICall |
Remarks
When a call to Expect is performed, the compiler (and Visual Studio intellisense) will automatically pick one interface or the other as the return types depending on the expression passed in the call: if the expression represents a call to a void method, ICall members will be available after the Expect invocation, allowing the specification of a Throws(Exception) or Callback(Action) action, but not a Returns one.
On the other hand, if the expression passed to the Expect method represents a call to a method that returns a value, the additional Returns(TResult) and Returns(Func<(Of <(TResult>)>)) members are available (Throws and Callback are inherited from ICall).