Class EqualityComparerEqualsAssertion

Namespace: AutoFixture.Idioms
Assembly: AutoFixture.Idioms.dll

A base class for building classes that encapsulate a unit test that verifies that a type implementing IEqualityComparer%601 implements it correctly.

public abstract class EqualityComparerEqualsAssertion : IdiomaticAssertion, IIdiomaticAssertion

Inheritance

objectIdiomaticAssertionEqualityComparerEqualsAssertion

Derived

EqualityComparerEqualsNullAssertion, EqualityComparerEqualsNullNullAssertion, EqualityComparerEqualsSelfAssertion, EqualityComparerEqualsSymmetricAssertion, EqualityComparerEqualsTransitiveAssertion

Implements

IIdiomaticAssertion

Inherited Members

IdiomaticAssertion.Verify(params Assembly[]), IdiomaticAssertion.Verify(IEnumerable<Assembly>), IdiomaticAssertion.Verify(Assembly), IdiomaticAssertion.Verify(params Type[]), IdiomaticAssertion.Verify(IEnumerable<Type>), IdiomaticAssertion.Verify(Type), IdiomaticAssertion.Verify(params MemberInfo[]), IdiomaticAssertion.Verify(IEnumerable<MemberInfo>), IdiomaticAssertion.Verify(MemberInfo), IdiomaticAssertion.Verify(params ConstructorInfo[]), IdiomaticAssertion.Verify(IEnumerable<ConstructorInfo>), IdiomaticAssertion.Verify(FieldInfo), IdiomaticAssertion.Verify(params FieldInfo[]), IdiomaticAssertion.Verify(IEnumerable<FieldInfo>), IdiomaticAssertion.Verify(ConstructorInfo), IdiomaticAssertion.Verify(params MethodInfo[]), IdiomaticAssertion.Verify(IEnumerable<MethodInfo>), IdiomaticAssertion.Verify(MethodInfo), IdiomaticAssertion.Verify(params PropertyInfo[]), IdiomaticAssertion.Verify(IEnumerable<PropertyInfo>), IdiomaticAssertion.Verify(PropertyInfo), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

EqualityComparerEqualsAssertion(ISpecimenBuilder)

Initializes a new instance of the EqualityComparerEqualsAssertion class.

protected EqualityComparerEqualsAssertion(ISpecimenBuilder builder)

Parameters

builder ISpecimenBuilder

A composer which can create instances required to implement the idiomatic unit test, such as the owner of the property, as well as the value to be assigned and read from the member.

Remarks

builder will typically be a `Fixture` instance.

Properties

Builder

Gets the builder supplied by the constructor.

public ISpecimenBuilder Builder { get; }

Property Value

ISpecimenBuilder

Methods

Verify(MethodInfo)

Forwards the call to Type) if the supplied method is an implementation of Equals(%600%2c%600).

public override void Verify(MethodInfo methodInfo)

Parameters

methodInfo MethodInfo

The method to verify.

VerifyEquals(MethodInfo, Type)

Abstract method used to verify if the method implements correctly Equals(%600%2c%600).

protected abstract void VerifyEquals(MethodInfo methodInfo, Type argumentType)

Parameters

methodInfo MethodInfo

The method to verify.

argumentType Type

The argument type of Equals(%600%2c%600).