JaVa
   

More Typical Mock Objects

The use of mock objects is convenient in various places in our code. The mock streams described in the previous section are just as typical as the examples we will see later in the realm of databases (see ) and Web apps (see ). Here are a few additional ideas:

This type of testing is very sensitive to minor modifications of our CUT's implementation, therefore we recommend it exclusively for cases where the exact sequence is part of the specification. This is often the case with frameworks, where abstract framework superclasses guarantee the invocation sequence of abstract methods. [4] [4]This corresponds to the Template Method design pattern [Gamma95].


JaVa
   
Comments