A tautology test is arranged to always pass or contains assertions with no meaningful semantic check. It may execute quickly and resist refactoring, but it provides no protection against regressions. section 4.4
Prevent tautological checks by following these rules:
- Assert against an independent set of test literals or constants rather than reusing production values. section 9.3
- Check observable behavior instead of merely repeating an assignment or encoding implementation details. section 4.4
A trivial test becoming tautological
A test that assigns "John Smith" to User.Name and immediately asserts that the property returns "John Smith" exercises almost no behavior; it can pass without protecting meaningful functionality. section 4.4
