Package test.tree
Class TestMyNode
This class tests MyNode
setUp
- This method is executed prior to each test.
myNode is set to referenca node with value 5;
tearDown
- This method is executed after each test.
All possibly created references to nodes are cleared.
testGetValue
- Test if a node is initialized to its correct value.
testSetValue
- Test if a node's value is modified correctly.
testRightChild
- Test if a node's right child is initialized to null.
Test if a node's right child is modified correctly.
testLeftChild
- Test if a node's left child is initialized to null.
Test if a node's left child is modified correctly.
testCalcSize
- Test if the size of a subtree is correclty calculated.
Three cases are tested: subtree of one node, subtree of root and left child,
subtree of root and right child, subtree of root and both left and right child.
This should test all possible cases because of the recursive implementation.