Class MultipleCustomization
Namespace: AutoFixture
Assembly: AutoFixture.dll
A customization that enables conventions for well-known types that represents multiple items.
[Obsolete("This customization is no longer needed as builders are available out-of-the-box. It will be removed in future version of AutoFixture.")]
public class MultipleCustomization : ICustomizationInheritance
object ← MultipleCustomization
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
When this customization is added to an `IFixture` instance, requests for common sequence and collection types will be satisfied with instances populated with multiple items.
Normally, `Fixture` can satisfy requests for `List%601` and similar collection types, but the returned instances will be empty. When the `MultipleCustomization` is added to an `IFixture`, such collection specimens will be populated with items.
Please note that apart from the concrete types `List%601`, `Collection%601` etc. this `ICustomization` also resolves requests for the related interfaces `IList%601`, `ICollection%601` etc. This can potentially conflict with other customizations, such as the auto-mocking extensions for AutoFixture. In this case latest customization to be added to a Fixture wins.
Constructors
MultipleCustomization()
public MultipleCustomization()Methods
Customize(IFixture)
Customizes the specified fixture by adding conventions for populating sequences and collections.
public void Customize(IFixture fixture)Parameters
fixture IFixture
The fixture to customize.