Test Case Identifier
TC-P_C05
Test Items
The purpose of the test is to check that using the removeLoop method will remove any loops created in the path. Methods to be used: addNode(), addEdge(), add(), setRoot(), removeLoops(), contains().
Input Specification
Test Case Specification: Add an object of Single Graph class and an object of Path class. Add three nodes to the graph. Add one edge that uses the firdt node as a source node and the second node as a target node, add another edge that uses the second node as a source node and the third node as a target node, add a third edge that uses the third node as both a source and a target node i.e. create a loop. Set the first node as a root to the path. Add the created nodes and edges to the path. Call the removeLoop method to the path.
Output Specification
Assert that false is returned when checking whether the path contains the third edge i.e. assert that the loop created by the third edge has been removed.