We left the last chapter having invoked the tests. In this chapter, we will
Design the protocol for collecting test results
Outline what it takes to actually run the tests
Display the test results
How are we going to display the results? The JUnit plug-in class should know nothing about how results are displayed. So, what if the plug-in class broadcasts the results of tests that are running?
The Observer pattern is useful when you have loosely coupled communication patterns:
You don't care in what order the receivers receive the messages.
You don't have to return any results to the sender.
You don't know a priori how many objects will want to receive the message (see Figure 7.1).
Figure 7.1. One Subject Notifies Several ...