6.2 Weltering in Technical Terms


6.2 Weltering in Technical Terms

Before we deal with more challenging falsifications, we will have a look at the terms used. There are many terms used for what we are calling a dummy object, including stub, mock, and shunt. Unfortunately, these terms are used inconsistently in the literature and, we have to assume, randomly. We will be using the different flavors as follows.

A stub is part of a software that has been implemented rudimentarily and will later be replaced by the correct implementation. A stub object serves as placeholder for a functionality we have planned but not yet implemented.

In contrast, a dummy (or testing stub) can replace the real implementation for test purposes. Whether or not we will use the real object or a dummy object will be determined by the internal or external configuration

A mock differs from a dummy by additional functionality. If necessary, a mock object allows us to set the reactions desired by the object and to verify the correct behavior of its "client." Chapter 6, Section 6.5 discusses mock objects in detail.




Unit Testing in Java. How Tests Drive the Code
Unit Testing in Java: How Tests Drive the Code (The Morgan Kaufmann Series in Software Engineering and Programming)
ISBN: 1558608680
EAN: 2147483647
Year: 2003
Pages: 144
Authors: Johannes Link

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net