Class AutoMoqCustomization
Namespace: AutoFixture.AutoMoq
Assembly: AutoFixture.AutoMoq.dll
Enables auto-mocking with Moq.
public class AutoMoqCustomization : ICustomizationInheritance
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 AutoMoqCustomization { ConfigureMembers = true }
Constructors
AutoMoqCustomization()
Initializes a new instance of the AutoMoqCustomization class.
NOTICE! You can assign the customization properties to tweak the features you would like to enable. Example:
new AutoMoqCustomization { ConfigureMembers = true }
public AutoMoqCustomization()Properties
ConfigureMembers
Specifies whether members of a mock will be automatically setup to retrieve the return values from a fixture.
public bool ConfigureMembers { get; set; }Property Value
GenerateDelegates
If value is true, delegate requests are intercepted and created by Moq.
Otherwise, if value is false, delegates are created by the AutoFixture kernel.
public bool GenerateDelegates { get; set; }Property Value
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 Moq.
public void Customize(IFixture fixture)Parameters
fixture IFixture
The fixture upon which to enable auto-mocking.