public void Equality_ReallyTheSame() { var a = new TestIDEEvent { Id = "1", ActiveDocument = Names.Document("d d"), ActiveWindow = Names.Window("w w"), // Duration is automatically set IDESessionUUID = "2", KaVEVersion = "3", TriggeredAt = DateTime.Today.AddDays(-1), TerminatedAt = DateTime.Today, TriggeredBy = EventTrigger.Click }; var b = new TestIDEEvent { Id = "1", ActiveDocument = Names.Document("d d"), ActiveWindow = Names.Window("w w"), // Duration is automatically set IDESessionUUID = "2", KaVEVersion = "3", TriggeredAt = DateTime.Today.AddDays(-1), TerminatedAt = DateTime.Today, TriggeredBy = EventTrigger.Click }; Assert.AreEqual(a, b); Assert.AreEqual(a.GetHashCode(), b.GetHashCode()); }
public void Equality_Default() { var a = new TestIDEEvent(); var b = new TestIDEEvent(); Assert.AreEqual(a, b); Assert.AreEqual(a.GetHashCode(), b.GetHashCode()); }
public void Equality_DifferentId() { var a = new TestIDEEvent { Id = "1" }; var b = new TestIDEEvent(); Assert.AreNotEqual(a, b); Assert.AreNotEqual(a.GetHashCode(), b.GetHashCode()); }