Class SubstituteRequest
Namespace: AutoFixture.AutoNSubstitute
Assembly: AutoFixture.AutoNSubstitute.dll
Defines a request for a substitute.
public class SubstituteRequestInheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
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
SubstituteRequest(Type)
Initializes a new instance of the SubstituteRequest class.
public SubstituteRequest(Type targetType)Parameters
targetType Type
A Type for which a substitute is being requested.
Properties
TargetType
Gets the type for which a substitute is requested.
public Type TargetType { get; }Property Value
Methods
ToString()
Add user friendly request message.
public override string ToString()