Test Case Method Identifier
getEdgeIterator
Test Items
The purpose of testing the getEdgeIterator method is to check whether the method correctly handles the iterator of the edges of a graph.
Input Specification
To test the getEdgeIterator method, we used several behaviors on the iterator element, both illegal. One is to get the next edge from the iterator, reaching a point where there are no edges left in the iterator, and try to get a next edge which doesn't exists, while the second one is to remove edges from the iterator, again reaching a point where the are no more edges to be removed, but still try to remove another edge.
Output Specification
Assert that, in the first case, the method iterator.next() returns a NoSuchElementException, while in the second one, iterator.remove() should return an IllegalStateException.