Name |
Page |
Summary |
Adapt Parameter |
326 |
Change parameter to an adapter when you cannot use extract interface |
Break Out Method Object |
330 |
Convert method using instance data into a class with a ctor and single method |
Encapsulate Global References |
339 |
Move access to global data into access via a class to allow for variations during test |
Extract and Override Call |
348 |
Turn chunk of code into overridable method and then subclass in test |
Extract and Override Getter |
352 |
Turn references into hard-coded object into call to getter and then subclass |
Extract Interface |
362 |
Extract interface for concrete class, then use interface. Override in test. |
Introduce Instance Delegator |
317 |
Add instance methods calling static methods. Call through instance, which test subclasses. |
Parameterize Constructor, Parameterize Method |
379, 383 |
Examples of Inversion of Control (IoC) |
|
|
|
Subclass and override method |
401 |
Test creates subclass & passes it in/requires some IoC |
Sprout Method, Sprout Class |
59, 63 |
Create a method or class out of existing code. |
Comments