Question 1: Where are the assertion functions used in JUnit defined? We call them as if there were globally defined functions like we have in C++, but Java doesn't allow that (does it?).
Question 2: What Java mechanism/technique/hack is used to accompish this?
Question 3: In what sense of inheritance is TestCase a subclass of its supertype? Explain if this seems a good OO design. If not, explain why the JUnit authors might have done this.
Question 4: Choose TestSuite and invoke the type hierarchy perspective. What are its superclass(es) and subclass(es)?
Question 5: Use the type hierarchy to show what interfaces TestSuite implements.
Then, go that interface, invoke the type hierarchy viewer again on that, and write down what classes implement that interface.
Question 6: Examine Test, TestSuite, and TestCase. Explain or draw why this is an example of the Composite design pattern.
Question 7: How does this example differ from the drawing and description of Composite given in the handout? Do you think this is OK in terms of it still being a Composite? Why did the authors of JUnit do it this way?
Question 8: In the handout, the pattern description shows that the AbstractComponent class has methods (or signatures) for all of the methods in its subtypes. Is that true here? Why not? Can you think of design reasons deciding whether or not to put them all in the superclass?