Enum MockBehavior
- Namespace
- Moq
- Assembly
- Moq.dll
Options to customize the behavior of the mock.
public enum MockBehavior
Fields
Default = 1Default mock behavior, which equals Loose.
Loose = 1Will never throw exceptions, returning default
values when necessary (null for reference types, zero for value types or empty enumerables and arrays).Strict = 0Causes the mock to always throw an exception for invocations that don't have a corresponding setup.