Class ConstructorCustomization
A customization that uses a particular constructor selection mechanism to pick and invoke a constructor to create specimens of the targeted type.
Inheritance
System.Object
ConstructorCustomization
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoFixture
Assembly: AutoFixture.dll
Syntax
public class ConstructorCustomization : ICustomization
Constructors
| Improve this Doc View SourceConstructorCustomization(Type, IMethodQuery)
Initializes a new instance of the ConstructorCustomization class.
Declaration
public ConstructorCustomization(Type targetType, IMethodQuery query)
Parameters
Type | Name | Description |
---|---|---|
System.Type | targetType | The System.Type for which |
IMethodQuery | query | The query that selects a constructor for |
Properties
| Improve this Doc View SourceQuery
Gets the query that selects a constructor for TargetType.
Declaration
public IMethodQuery Query { get; }
Property Value
Type | Description |
---|---|
IMethodQuery |
TargetType
Gets the System.Type for which Query should be used to select the most appropriate constructor.
Declaration
public Type TargetType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
| Improve this Doc View SourceCustomize(IFixture)
Customizes the specified fixture by modifying TargetType to use Query as the strategy for creating new specimens.
Declaration
public void Customize(IFixture fixture)
Parameters
Type | Name | Description |
---|---|---|
IFixture | fixture | The fixture to customize. |