Test Case Identifier
removeNode
Test Items
The purpose of the test is to verify that the method removeNode functions properly i.e. removes both the specified node and the edge using it. The methods to be used are:
  • public T removeNode(java.lang.String id)
  • public T removeNode(Node node)
  • protected T removeNode_(java.lang.String sourceId, long timeId, AbstractNode node, java.lang.String nodeId, boolean graphCallback)
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
  • Output Specification
    Assert that by calling remove node we can properly remove a node on a certain graph
    • Assert that removing a node which not exist return the ElementNotFoundException
    • Assert that after removing a node, the node count is equal to the oldNodeCount - 1
    • Assert that while there are more than one graph with every node having a node degree greater 1, removing a node return the correct node count
    • Assert that while there are more than one graph with every node having a node degree equal 0, removing a node return the correct node count