Check out a free preview of the full The Psychology of Code Testability course:
The "Testing Classes and Business Logic" Lesson is part of the full, The Psychology of Code Testability course featured in this preview video. Here's what you'd learn in this lesson:

How do you test a class? You test it by replacing the class’s sub-dependencies with ‘friendly’ dummy modules. Then everything that goes wrong is in the class under test. The real sub-dependencies can be plugged back in later. Keep business-logic separate from object graph construction and lookup. Mixing these two types of coding makes testing hard. It’s easier to replace real modules with friendly modules.

Get Unlimited Access Now