Test Case Identifier
removeEdge
Test Items
The purpose of the test is to verify that the method removeEdge functions properly i.e. removes the specified edge. The methods to be used are:
  • removeEdge(Edge edge)
  • removeEdge(java.lang.String id)
  • protected void removeEdge(AbstractEdge edge, boolean graphCallback, boolean sourceCallback, boolean targetCallback)
  • removeEdge(int index)
  • removeEdge(int fromIndex, int toIndex)
  • removeEdge(Node node1, Node node2)
  • removeEdge(java.lang.String from, java.lang.String to)
Input Specification

The possible values of the different categories for the method's inputs and environment are defined in the following text file:
  • Categories definition

  • The combinations of the category values (generated with genpairs) to be used as input for the test cases to be generated are presented in the following csv file:
  • Categories' values
  • More than one method can be tested using the same input thus more test cases than the ones specified in the csv files can be performed.
    Output Specification
    Assertion:
    • removeEdge(Edge edge): assert that number of nodes are correct after removing a wrong node.
    • removeEdge(java.lang.String id): assert that the correct exception is raised removing wrong node.
    • protected void removeEdge(AbstractEdge edge, boolean graphCallback, boolean sourceCallback, boolean targetCallback) : assert that number of nodes are correct after removing a wrong node.
    • removeEdge(int index): assert that number of nodes are correct after removing a wrong node.
    • removeEdge(int fromIndex, int toIndex): assert that number of nodes are correct after removing a wrong node.
    • removeEdge(Node node1, Node node2): assert that number of nodes are correct after removing a wrong node.
    • removeEdge(java.lang.String from, java.lang.String to): assert that the correct exception is raised removing wrong node