Class FreezingCustomization
A customization that will freeze a specimen of a given System.Type.
Inheritance
System.Object
FreezingCustomization
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 FreezingCustomization : ICustomization
Constructors
| Improve this Doc View SourceFreezingCustomization(Type)
Initializes a new instance of the FreezingCustomization class.
Declaration
public FreezingCustomization(Type targetType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | targetType | The System.Type to freeze. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
FreezingCustomization(Type, Type)
Initializes a new instance of the FreezingCustomization class.
Declaration
public FreezingCustomization(Type targetType, Type registeredType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | targetType | The System.Type to freeze. |
System.Type | registeredType | The System.Type to map the frozen |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Either |
System.ArgumentException |
|
Properties
| Improve this Doc View SourceRegisteredType
Gets the System.Type to which the frozen TargetType value should be mapped to. Defaults to the same System.Type as TargetType.
Declaration
public Type RegisteredType { get; }
Property Value
Type | Description |
---|---|
System.Type |
TargetType
Gets the System.Type to freeze.
Declaration
public Type TargetType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
| Improve this Doc View SourceCustomize(IFixture)
Customizes the fixture by freezing the value of TargetType.
Declaration
public void Customize(IFixture fixture)
Parameters
Type | Name | Description |
---|---|---|
IFixture | fixture | The fixture to customize. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|