O'Reilly logo

Contributing to Eclipse: Principles, Patterns, and Plug-Ins by Kent Beck, Erich Gamma

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Displaying the Results

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required