public void CheckNullTest() { TrialClass t = null; Assert.IsTrue(t.TestNullBeforeEquals(null, () => false)); TrialClass t2 = null; Assert.IsTrue(t.TestNullBeforeEquals(t2, () => false)); t2 = new DerivedTrialClassB(10, 10); Assert.IsFalse(t.TestNullBeforeEquals(t2, () => true)); t = t2; Assert.IsTrue(t.TestNullBeforeEquals(t2, () => false)); t = new DerivedTrialClassB(2, 2); Assert.IsTrue(t.TestNullBeforeEquals(t2, () => true)); }
public override bool Equals(TrialClass other) => Equals(other as DerivedTrialClassC);