public void T_GetOtherNode_Node2() { // Arrange Cell cell = new Cell(); Cell cell2 = new Cell(); cell.Value = '1'; cell2.Value = 'A'; GraphNode graphNodeBgn = new GraphNode(cell); GraphNode graphNodeEnd = new GraphNode(cell2); GraphArc graphArc = new GraphArc(graphNodeBgn, graphNodeEnd); // Act GraphNode otherNode = graphArc.GetOtherNode(graphNodeBgn); // Assert Assert.AreEqual(otherNode, graphNodeEnd); }
public void T_GetOtherNode_InexistantCell() { // Arrange Cell cell = new Cell(); Cell cell2 = new Cell(); Cell cell3 = new Cell(); cell.Value = '1'; cell2.Value = 'A'; GraphNode graphNodeBgn = new GraphNode(cell); GraphNode graphNodeEnd = new GraphNode(cell2); GraphNode graphNode = new GraphNode(cell3); GraphArc graphArc = new GraphArc(graphNodeBgn, graphNodeEnd); // Act GraphNode otherNode = graphArc.GetOtherNode(graphNode); // Assert Assert.IsNull(otherNode); }