public void RegioGraaf_b_AddVertex_1_OneAdded() { // Arrange IGraph graph = DSBuilder.CreateGraphEmpty(); var expected = "Q"; // Act graph.AddVertex("A", "Q"); string actual = graph.GetVertex("A").GetRegio(); // Assert Assert.AreEqual(expected, actual); }
public void Graph_ToString_OnEmptyGraph() { // Arrange IGraph graph = DSBuilder.CreateGraphEmpty(); string expected = ""; // Act string actual = StringWithoutSpaces(graph.ToString()); // Assert Assert.AreEqual(expected, actual); Assert.Pass(); }
public void RegioGraaf_c_AddUndirectedEdge_1_OneAdded() { // Arrange IGraph graph = DSBuilder.CreateGraphEmpty(); var expected = StringWithoutSpaces( "A [ X(2000) ] X [ A(2000) ]"); graph.GetVertex("A"); graph.GetVertex("X"); // Act graph.AddUndirectedEdge("A", "X", 2000); string actual = StringWithoutSpaces(graph.ToString()); // Assert Assert.AreEqual(expected, actual); }
public void RegioGraaf_b_AddVertex_2_TwoAdded() { // Arrange IGraph graph = DSBuilder.CreateGraphEmpty(); var expected1 = "Q"; var expected2 = "S"; // Act graph.AddVertex("A", "Q"); graph.AddVertex("F", "S"); string actual1 = graph.GetVertex("A").GetRegio(); string actual2 = graph.GetVertex("F").GetRegio(); // Assert Assert.AreEqual(expected1, actual1); Assert.AreEqual(expected2, actual2); }