Class AutoFakeItEasyCustomization

Namespace: AutoFixture.AutoFakeItEasy
Assembly: AutoFixture.AutoFakeItEasy.dll

Enables auto-mocking with FakeItEasy.

public class AutoFakeItEasyCustomization : ICustomization

Inheritance

objectAutoFakeItEasyCustomization

Implements

ICustomization

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Remarks

NOTICE! You can assign the customization properties to tweak the features you would like to enable. See example.

new AutoFakeItEasyCustomization { GenerateDelegates = true }

Constructors

AutoFakeItEasyCustomization()

Initializes a new instance of the AutoFakeItEasyCustomization class.

NOTICE! You can assign the customization properties to tweak the features you would like to enable. Example:

new AutoFakeItEasyCustomization { GenerateDelegates = true }

public AutoFakeItEasyCustomization()

AutoFakeItEasyCustomization(ISpecimenBuilder)

Initializes a new instance of the AutoFakeItEasyCustomization class, using the specified relay instead of a FakeItEasyRelay.

[Obsolete("This constructor is obsolete and will be removed in the future version of the product. Please use the AutoFakeItEasyCustomization() overload (without arguments) instead and set the Relay property.")]
public AutoFakeItEasyCustomization(ISpecimenBuilder relay)

Parameters

relay ISpecimenBuilder

The relay.

Properties

ConfigureMembers

Specifies whether members of a Fake will be automatically setup to retrieve the return values from a fixture.

public bool ConfigureMembers { get; set; }

Property Value

bool

GenerateDelegates

When true, configures the fixture to automatically generate Fakes when a delegate is requested.

public bool GenerateDelegates { get; set; }

Property Value

bool

Relay

Gets or sets the relay that will be added to ResidueCollectors when IFixture) is invoked.

public ISpecimenBuilder Relay { get; set; }

Property Value

ISpecimenBuilder

Methods

Customize(IFixture)

Customizes an IFixture to enable auto-mocking with FakeItEasy.

public void Customize(IFixture fixture)

Parameters

fixture IFixture

The fixture upon which to enable auto-mocking.