FastMoq
Search Results for

    Show / Hide Table of Contents

    Class MockBehaviorOptions

    Mutable container for the enabled MockFeatures on a Mocker instance.

    Inheritance
    object
    MockBehaviorOptions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: FastMoq
    Assembly: FastMoq.Core.dll
    Syntax
    public sealed class MockBehaviorOptions

    Properties

    Enabled

    Gets or sets the currently enabled feature flags.

    Declaration
    public MockFeatures Enabled { get; set; }
    Property Value
    Type Description
    MockFeatures

    LenientPreset

    Gets the predefined lenient behavior preset.

    Declaration
    public static MockBehaviorOptions LenientPreset { get; }
    Property Value
    Type Description
    MockBehaviorOptions

    StrictPreset

    Gets the predefined strict behavior preset.

    Declaration
    public static MockBehaviorOptions StrictPreset { get; }
    Property Value
    Type Description
    MockBehaviorOptions

    Methods

    Clone()

    Creates a copy of the current behavior options.

    Declaration
    public MockBehaviorOptions Clone()
    Returns
    Type Description
    MockBehaviorOptions

    Has(MockFeatures)

    Returns true when the supplied feature flag is enabled.

    Declaration
    public bool Has(MockFeatures feature)
    Parameters
    Type Name Description
    MockFeatures feature

    The feature flag to test.

    Returns
    Type Description
    bool

    Extension Methods

    ObjectExtensions.RaiseIfNull<T>(T?, string?, string?, int?, string?)
    TestClassExtensions.GetFieldValue<TObject>(TObject, string, TObject?)
    TestClassExtensions.GetField<TObject>(TObject, string)
    TestClassExtensions.GetMemberName<T, TValue>(T, Expression<Func<T, TValue>>)
    TestClassExtensions.GetMember<T, TValue>(T, Expression<Func<T, TValue>>)
    TestClassExtensions.GetMethodValue<TObject>(TObject, string, object?, params object[])
    TestClassExtensions.GetMethod<TObject>(TObject, string)
    TestClassExtensions.GetPropertyValue<TObject>(TObject, string, object?)
    TestClassExtensions.GetProperty<TObject>(TObject, string)
    TestClassExtensions.SetFieldValue<TObject>(TObject, string, object?)
    TestClassExtensions.SetPropertyValue<TObject>(TObject, string, object?)
    MockerHttpMoqExtensions.SetupHttpMessage(object, Func<HttpResponseMessage>, Expression?, Expression?)
    MockerHttpMoqExtensions.SetupMessageAsync<TMock, TReturn>(object, Expression<Func<TMock, Task<TReturn>>>, Func<TReturn>)
    MockerHttpMoqExtensions.SetupMessageProtectedAsync<TMock, TReturn>(object, string, Func<TReturn>, params object?[]?)
    MockerHttpMoqExtensions.SetupMessageProtected<TMock, TReturn>(object, string, Func<TReturn>, params object?[]?)
    MockerHttpMoqExtensions.SetupMessage<TMock, TReturn>(object, Expression<Func<TMock, TReturn>>, Func<TReturn>)
    TestClassExtensions.GetFieldInfo<TType>(object, string)
    TestClassExtensions.GetFieldValue<T>(object?, FieldInfo)
    TestClassExtensions.GetFieldValue<T, TType>(object, string)
    In this article
    Back to top
    Generated 2026-04-08 12:38 UTC