Lecture 22 Objectives
At the end of today's class you should
KNOW:
- That when we write tests for methods that return LinkedLists, the
test cases have to get more complicated to build-up the expected answers
- That when we write tests for methods that may return more than one
correct answer, we need to write validity methods, not single concrete
expected values, as part of our tests
BE ABLE TO:
- Write methods that return LinkedLists during traversals of complex data
structures
- Write tests for methods that may return more than one answer
Sample Exam Question:
Suppose we added an edge to our graph that connected Worcester to Hartford.
The following call now has two correct answers:
bost.findRoute(hart)
Describe how you would construct a test for this example.