public void EqualityTest() { Alg alg1 = Alg.FromEnumerable(new[] { Move.L2, Move.F1, Move.R3 }); Alg alg2 = Alg.FromEnumerable(new[] { Move.L2, Move.F1, Move.R3 }); Alg nullAlg = null; Assert.IsTrue(alg1.Equals(alg1)); Assert.IsTrue(alg1.Equals(alg2)); Assert.IsFalse(alg1.Equals(nullAlg)); Assert.IsTrue(Alg.AreEqual(alg1, alg1)); Assert.IsTrue(Alg.AreEqual(alg1, alg2)); Assert.IsFalse(Alg.AreEqual(null, alg1)); #pragma warning disable CS1718 // Comparison made to same variable Assert.IsTrue(alg1 == alg1); Assert.IsTrue(alg1 == alg2); Assert.IsFalse(alg1 == nullAlg); Assert.IsFalse(nullAlg == alg1); Assert.IsFalse(alg1 != alg1); Assert.IsFalse(alg1 != alg2); Assert.IsTrue(alg1 != nullAlg); Assert.IsTrue(nullAlg != alg1); #pragma warning restore CS1718 // Comparison made to same variable }