Intro to Unit Testing - raisercostin/raisercostin.github.io GitHub Wiki
state:draft
Problems
- How to reuse testing code?
Extract code in methods and call them. - How to reuse entire batteries?
Extract test parameters and define a junit parametric test. - How to execute a specific failing test from a parametric test in eclipse?
You cannot. Extract it in a separate test and call it.
Conclusions
- Parametric tests are brittle.
- Reuse through methods with parameters.
- Have boilerplate test methods that call the methods with parameters.