Interface IMock<T>
- Namespace
- Moq
- Assembly
- Moq.dll
Covariant interface for Mock<T> such that casts between IMock<Employee> to IMock<Person> are possible. Only covers the covariant members of Mock<T>.
public interface IMock<out T> where T : class
Type Parameters
T
Properties
Behavior
Behavior of the mock, according to the value set in the constructor.
MockBehavior Behavior { get; }
Property Value
CallBase
Whether the base member virtual implementation will be called for mocked classes if no setup is matched. Defaults to false.
bool CallBase { get; set; }
Property Value
DefaultValue
Specifies the behavior to use when returning default values for unexpected invocations on loose mocks.
DefaultValue DefaultValue { get; set; }
Property Value
Object
Exposes the mocked object instance.
T Object { get; }
Property Value
- T