Skip to main content

Test Harness Entry Diagnostics

Diagnose exactly why a class or method cannot be placed under test and route to the right dependency-breaking technique. Use whenever a developer says 'I can't instantiate this class in tests', 'the test harness won't compile', 'this class has too many constructor dependencies', 'the constructor connects to the database', 'can't test this private method', 'I need to sense what this method does', 'hidden singleton dependency'. Activates for 'test harness', 'class under test', 'constructor dependencies', 'irritating parameter', 'hidden dependency', 'construction blob', 'pass null', 'construction test', 'method not accessible', 'method side effects', 'can't get this class in a test harness', 'can't run this method in a test harness', 'singleton in constructor', 'include dependencies', 'onion parameter', 'aliased parameter'.

Install

1. Add marketplace
/plugin marketplace add bookforge-ai/bookforge-skills
2. Install plugin
/plugin install working-effectively-with-legacy-code@bookforge-skills
3. Use the skill
/test-harness-entry-diagnostics
CC-BY-SA · Open sourceGitHub

What You'll Need

ReadGrepBashEdit (optional)

Source Book

Working Effectively with Legacy Code cover

Working Effectively with Legacy Code

Michael C. Feathers