next up previous contents
Next: ServerConnection Up: The Server Previous: UserDatabase   Contents

LookupTable and ServerMeasure

LookupTable was tested by creating a table, using setEntry() and setRow() to enter some data and then getEntry() and getRow() to retrieve different combinations of data to check that the entered data was returned when it was supposed to be and exceptions were thrown when no data was present.

ServerMeasure had three methods to be tested that were not part of NetMeasure: recalc(); minSpanningTree() and deleteServer(). These were tested by giving it a short list of servers and having it calculate the RTT times to them. Fictional RTTs for the other servers were then manually inserted into the table and the table printed out so the insertion could be verified. minSpanningTree() was then used to calculate the minimum spanning tree based on this data and printout out the list of ``ourConnections'' which was then verified against a manual calculation of the minimum spanning tree. Finally, a deleteServer() command was issued and the table printed again so that it could be verified that the values had actually been deleted. Output from these tests can be seen in appendix A.3.2.


next up previous contents
Next: ServerConnection Up: The Server Previous: UserDatabase   Contents
Nathan Dimmock 2001-06-20