Table of Contents

Enum MockBehavior

Namespace
Moq
Assembly
Moq.dll

Options to customize the behavior of the mock.

public enum MockBehavior

Fields

Default = 1

Default mock behavior, which equals Loose.

Loose = 1

Will never throw exceptions, returning default
values when necessary (null for reference types, zero for value types or empty enumerables and arrays).

Strict = 0

Causes the mock to always throw an exception for invocations that don't have a corresponding setup.