I've created this abstract base class for testing the Equals method.The basic idea is that derived class implements methods to get:the primary test instance, and a list of unequal instances (it's up tothe derived class to ensure that this list is sufficient instances for testingall possible inequalities)The base class then is responsible for using those instances to test.Am I missing any unit tests that would be useful for ensuring that the class is correctly using Equals and GetHashCode?using System.Collections.Generic;using System.Linq;using Microsoft.VisualStudio.TestTools.UnitTesting;/// <summary>/// A base class for testing the Equals method of an object./// </summary>[TestClass]public abstract class EqualityTestBase{    [TestMethod]    public void Equals_PassNull_ReturnFalse()    {        // -------- Assemble --------        object target = GetPrimary();        bool expected = false;        // -------- Act --------        bool actual = target.Equals(null);        // -------- Assert --------         Assert.AreEqual(expected, actual);    }    [TestMethod]    public void Equals_PassGenericObject_ReturnFalse()    {        // -------- Assemble --------        object target = GetPrimary();        object genericObject = new object();        bool expected = false;        // -------- Act --------        bool actual = target.Equals(genericObject);        // -------- Assert --------         Assert.AreEqual(expected, actual);    }    [TestMethod]    public void Equals_EquivalentObject_ReturnTrue()    {        // -------- Assemble --------        object target = GetPrimary();        object equivalent = GetPrimary();        bool expected = true;        // -------- Act --------        bool actual = target.Equals(equivalent);        // -------- Assert --------         Assert.AreEqual(expected, actual);    }    [TestMethod]    public void Equals_SameObject_ReturnTrue()    {        // -------- Assemble --------        object target = GetPrimary();        bool expected = true;        // -------- Act --------        bool actual = target.Equals(target);        // -------- Assert --------         Assert.AreEqual(expected, actual);    }    [TestMethod]    public void Equals_DifferentObjects_NoneMatch()    {        // -------- Assemble --------        object target = GetPrimary();        IEnumerable<object> nonEquivalents = GetNonEquivalentObjects();        bool expected = false;        // -------- Act --------        bool anyEqual = nonEquivalents.Any(nonEquivalent => target.Equals(nonEquivalent));        // -------- Assert --------         Assert.AreEqual(expected, anyEqual);    }    [TestMethod]    public void HashCode_EquivalentObject_BothSame()    {        // -------- Assemble --------        object target = GetPrimary();        object equivalent = GetPrimary();        bool expected = true;        // -------- Act --------        bool actual = target.GetHashCode() == equivalent.GetHashCode();        // -------- Assert --------         Assert.AreEqual(expected, actual);    }    [TestMethod]    public void HashCode_SameObject_BothSame()    {        // -------- Assemble --------        object target = GetPrimary();        bool expected = true;        // -------- Act --------        bool actual = target.GetHashCode() == target.GetHashCode();        // -------- Assert --------         Assert.AreEqual(expected, actual);    }    [TestMethod]    public void HashCode_DifferentObjects_NoneMatch()    {        // -------- Assemble --------        object target = GetPrimary();        IEnumerable<object> nonEquivalents = GetNonEquivalentObjects();        bool expected = false;        // -------- Act --------        bool anyEqual = nonEquivalents.Any(nonEquivalent => target.GetHashCode() == nonEquivalent.GetHashCode());        // -------- Assert --------         Assert.AreEqual(expected, anyEqual);    }    /// <summary>    /// Get the primary object for testing equality.    /// </summary>    /// <returns>The primary object</returns>    protected abstract object GetPrimary();    /// <summary>    /// Get the list of objects which should not equal the primary object.    /// </summary>    /// <returns>List of non equivalent objects</returns>    protected abstract IEnumerable<object> GetNonEquivalentObjects();}
Am I missing any unit tests in this base class for testing equality?
c#;unit testing
It seems to be complete but keep in mind that equality is reflexive, symmetric, and transitive so, as a formality, I would add tests:a.Equals(b) has the same value as b.Equals(a)if a.Equals(b) and b.Equals(c) are both true, then a.Equals(c) is also true