public void GraphIdAndHashCodeTest() { var graph1 = new PropertyGraph(123, null) { Description = "The first graph." }; var graph2 = new PropertyGraph(256, null) { Description = "The second graph." }; var graph3 = new PropertyGraph(123, null) { Description = "The third graph." }; Assert.IsNotNull(graph1.Id); Assert.IsNotNull(graph2.Id); Assert.IsNotNull(graph3.Id); Assert.IsNotNull(graph1.Description); Assert.IsNotNull(graph2.Description); Assert.IsNotNull(graph3.Description); Assert.IsNotNull(graph1.GetHashCode()); Assert.IsNotNull(graph2.GetHashCode()); Assert.IsNotNull(graph3.GetHashCode()); Assert.AreEqual(graph1.Id, graph1.GetHashCode()); Assert.AreEqual(graph2.Id, graph2.GetHashCode()); Assert.AreEqual(graph3.Id, graph3.GetHashCode()); Assert.AreEqual(graph1.Id, graph3.Id); Assert.AreEqual(graph1.GetHashCode(), graph3.GetHashCode()); Assert.AreNotEqual(graph1.Description, graph2.Description); Assert.AreNotEqual(graph2.Description, graph3.Description); Assert.AreNotEqual(graph3.Description, graph1.Description); }