Class MultipleCustomization
A customization that enables conventions for well-known types that represents multiple items.
Inheritance
Implements
Inherited Members
Namespace: AutoFixture
Assembly: AutoFixture.dll
Syntax
[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 : ICustomization
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 System.Collections.Generic.List`1 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 System.Collections.Generic.List`1, System.Collections.ObjectModel.Collection<T> etc. this ICustomization also resolves requests for the related interfaces System.Collections.Generic.IList<T>, System.Collections.Generic.ICollection<T> 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.
Methods
| Improve this Doc View SourceCustomize(IFixture)
Customizes the specified fixture by adding conventions for populating sequences and collections.
Declaration
public void Customize(IFixture fixture)
Parameters
Type | Name | Description |
---|---|---|
IFixture | fixture | The fixture to customize. |