Class EqualRequestSpecification

Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll

Evaluates whether a request is equal to an expected target.

public class EqualRequestSpecification : IRequestSpecification

Inheritance

objectEqualRequestSpecification

Implements

IRequestSpecification

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

EqualRequestSpecification(object)

Initializes a new instance of the EqualRequestSpecification class.

public EqualRequestSpecification(object target)

Parameters

target object

EqualRequestSpecification(object, IEqualityComparer)

Initializes a new instance of the EqualRequestSpecification class.

public EqualRequestSpecification(object target, IEqualityComparer comparer)

Parameters

target object

comparer IEqualityComparer

Properties

Comparer

Gets the equality comparer used to compare a request to the expected target.

public IEqualityComparer Comparer { get; }

Property Value

IEqualityComparer

Target

Gets the expected target.

public object Target { get; }

Property Value

object

Methods

IsSatisfiedBy(object)

Evaluates whether a request for a specimen is equal to the expected target.

public bool IsSatisfiedBy(object request)

Parameters

request object

Returns

bool