Quantcast
Channel: Sustainable Test-Driven Development
Viewing all articles
Browse latest Browse all 46

Mock Objects, Part 3

$
0
0
Dependency Injection Imagine that the example use previously was implemented differently: public class BoundaryAlarm {      private GPS myGPS;      private DashLight myDashLight;      public BoundaryAlarm(){            myGPS = new GPSImpl();            myDashLight = new DashLightImpl(); }      public void CheckFieldLocation(){      // Implementation unchanged } } The

Viewing all articles
Browse latest Browse all 46

Trending Articles