public void EqualsToNullPlan() { ArmPlan plan1 = new ArmPlan(null, null, null, null, null); ArmPlan plan2 = null; Assert.IsFalse(plan1.Equals(plan2)); }
public void EqualsToSamePlans() { ArmPlan plan1 = new ArmPlan(null, null, null, null, null); ArmPlan plan2 = plan1; Assert.IsTrue(plan1.Equals(plan2)); }
public void EqualsToVersion(bool expected, string version1, string version2) { ArmPlan plan1 = new ArmPlan(null, null, null, null, version1); ArmPlan plan2 = new ArmPlan(null, null, null, null, version2); Assert.AreEqual(expected, plan1.Equals(plan2), "Plans did not match expected equality"); Assert.AreEqual(expected, plan1.GetHashCode() == plan2.GetHashCode(), $"Hashcodes comparison was expect {expected} but was {!expected}, ({plan1.GetHashCode()}, {plan2.GetHashCode()})"); }
public void EqualsToObject() { ArmPlan plan1 = new ArmPlan(null, null, null, null, null); object stringPlan = "random"; Assert.IsFalse(plan1.Equals(stringPlan)); object nullObject = null; Assert.IsFalse(plan1.Equals(nullObject)); object samePlan = plan1; Assert.IsTrue(plan1.Equals(samePlan)); object plan2 = new ArmPlan("Plan2", null, null, null, null); Assert.IsFalse(plan1.Equals(plan2)); }