
Avoiding Coupling to Implementation Details

#58 - Principles for Writing Valuable Unit Tests - Vladimir Khorikov
Topic 13 of 18
Published Oct 4, 2021 · Clip 32:02–34:06 (2:04)
Vladimir clarifies resilience to refactoring with an example: tests should verify code behavior from the end user's perspective (e.g., checking the whole HTML result) rather than how the class internally generates it. Coupling tests to implementation details causes false alarms and undermines the ability to find real bugs.