Class MockCreationOptions
Options to influence mock creation in a provider agnostic manner.
Implements
Inherited Members
Namespace: FastMoq.Providers
Assembly: FastMoq.Abstractions.dll
Syntax
public sealed record MockCreationOptions : IEquatable<MockCreationOptions>
Constructors
MockCreationOptions(bool, bool, object?[]?, bool)
Initializes a new instance of the MockCreationOptions record.
Declaration
public MockCreationOptions(bool Strict = false, bool CallBase = true, object?[]? ConstructorArgs = null, bool AllowNonPublic = false)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | Strict | True to request strict mock behavior; otherwise false. |
| bool | CallBase | True to allow base implementation calls when the provider supports it; otherwise false. |
| object[] | ConstructorArgs | Optional constructor arguments to use when creating the mock target. |
| bool | AllowNonPublic | True to allow non-public constructors during mock creation; otherwise false. |
Properties
AllowNonPublic
Gets a value indicating whether non-public constructors may be used during mock creation.
Declaration
public bool AllowNonPublic { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
CallBase
Gets a value indicating whether base implementation calls are allowed when supported.
Declaration
public bool CallBase { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
ConstructorArgs
Gets the constructor arguments to use when the provider creates the mock target.
Declaration
public object?[]? ConstructorArgs { get; init; }
Property Value
| Type | Description |
|---|---|
| object[] |
Strict
Gets a value indicating whether strict mock behavior should be used.
Declaration
public bool Strict { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |