public void TestEquals_SameInstance() { var maxLong = Int64.MaxValue; var instance = new BatchId(maxLong); Assert.IsTrue(instance.Equals(instance)); }
public void TestEquals_NullObject() { var maxLong = Int64.MaxValue; var instance = new BatchId(maxLong); Assert.IsFalse(instance.Equals(null)); }
public void TestEquals_DifferentObjectType() { var maxLong = Int64.MaxValue; var instance = new BatchId(maxLong); Assert.IsFalse(instance.Equals(1)); }
/// <summary> /// Returns true if ExecProviderEvent instances are equal /// </summary> /// <param name="other">Instance of ExecProviderEvent to be compared</param> /// <returns>Boolean</returns> public bool Equals(ExecProviderEvent other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( BatchId == other.BatchId || BatchId != null && BatchId.Equals(other.BatchId) ) && ( ExeScript == other.ExeScript || ExeScript != null && ExeScript.Equals(other.ExeScript) ) && ( EventType == other.EventType || EventType != null && EventType.Equals(other.EventType) ) && ( ActivityId == other.ActivityId || ActivityId != null && ActivityId.Equals(other.ActivityId) )); }
public void TestEquals_DifferentInstanceSameId() { var maxLong = Int64.MaxValue; var instance = new BatchId(maxLong); var otherInstance = new BatchId(maxLong); Assert.IsTrue(instance.Equals(otherInstance)); }