Tagged articles

method verification

1 articles · Page 1 of 1
Alibaba Cloud Developer
Alibaba Cloud Developer
Jan 30, 2023 · Fundamentals

Mastering Effective Unit Tests: Principles, Practices, and Common Pitfalls

This article explains why unit tests should focus on verifying behavior rather than merely increasing coverage, outlines essential testing principles such as AIR, FIRST, and ASCII, provides concrete Java examples for writing, validating, and asserting tests, and offers detailed guidance on handling exceptions and method‑call verification to avoid ineffective testing.

MockitoUnit Testingcode coverage
0 likes · 47 min read
Mastering Effective Unit Tests: Principles, Practices, and Common Pitfalls