Test Case Identifier
addEdge
Test Items
The purpose of the test is to check that by calling the addEdge method on an existing singleGraph object a new edge will be added to the graph. The methods to be used are:
  • AddEdge(String,Node,Node)
  • AddEdge(String,String,String)
  • AddEdge(String,int,int)
  • AddEdge(String,int,int,boolean)
  • AddEdge(String,String fromNoode,String toNode)
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
    For each method there is a test for:
    • Assert that the node is correctly added by counting the number of nodes on the graph
    • Assert that ElementNotFoundException.class is thrown when the one of the two node does not exist
    • Assert that the two node added has the same values that is passed to AddEdge(..)
    • Assert that EdgeRejectedException.class is thrown when one of the node is not accepted by AddEdge(...)