public void ToStringShouldReturnNAIfDescriptionNotNullOrEmpty() { string expected = "Description: N/A"; DataEdge edge = new DataEdge(testNode1, testNode2); string actual = edge.ToString().Split(',')[1].TrimStart(' '); Assert.AreEqual(expected, actual); }
public void ToStringShouldReturnIdNAIfIdNullOrEmpty() { string expected = "ID: N/A"; DataEdge edge = new DataEdge(testNode1, testNode2) { ID = null }; string actual = edge.ToString().Split(',')[0].Replace("[", string.Empty); Assert.AreEqual(expected, actual); }
public void ToStringShouldReturnIdIfIdNotNullOrEmpty() { string expected = "ID: SnagL Test ID"; DataEdge edge = new DataEdge(testNode1, testNode2) { ID = "SnagL Test ID" }; string actual = edge.ToString().Split(',')[0].Replace("[", string.Empty); Assert.AreEqual(expected, actual); }
public void ToStringShouldReturnDescriptionIfDescriptionNotNullOrEmpty() { string expected = "Description: SnagL Test Description"; DataEdge edge = new DataEdge(testNode1, testNode2) { Description = "SnagL Test Description" }; string actual = edge.ToString().Split(',')[1].TrimStart(' '); Assert.AreEqual(expected, actual); }