Class SubstituteRequest
Defines a request for a substitute.
Inheritance
System.Object
SubstituteRequest
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)
Namespace: AutoFixture.AutoNSubstitute
Assembly: AutoFixture.AutoNSubstitute.dll
Syntax
public class SubstituteRequest
Remarks
Unlike some other test isolation frameworks which define types that represent the dynamically generated proxies, such as Mock{T} in Moq and Fake{T} in FakeItEasy, NSubstitute does not. This class fills this gap and allows AutoFixture to distinguish an explicit request for a substitute from a request for a regular type. This is necessary to support creation of substitutes for concrete types.
Constructors
| Improve this Doc View SourceSubstituteRequest(Type)
Initializes a new instance of the SubstituteRequest class.
Declaration
public SubstituteRequest(Type targetType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | targetType | A System.Type for which a substitute is being requested. |
Properties
| Improve this Doc View SourceTargetType
Gets the type for which a substitute is requested.
Declaration
public Type TargetType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
| Improve this Doc View SourceToString()
Add user friendly request message.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()