public void Compare_TwoSameConditions(ICondition left, ICondition right) { Assert.Multiple(() => { Assert.AreEqual(left, right); Assert.AreEqual(left.GetHashCode(), right.GetHashCode()); }); }
public bool Equals(ICondition other) { if (other == null) { return(false); } return(GetHashCode() == other.GetHashCode()); }
public override int GetHashCode() { unchecked { var hashCode = _logicalConjunction != null?_logicalConjunction.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (_condition != null ? _condition.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (_customDescription != null ? _customDescription.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (_reason != null ? _reason.GetHashCode() : 0); return(hashCode); } }