Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.
-- Steve Jobs

Tuesday, July 19, 2011

Parameterized unit tests with JUnit 4 (Locke's Socks)

Parameterized unit tests with JUnit 4 (Locke's Socks)
If you've ever found yourself writing a series of tests which differ only in their inputs and expected results, you've probably realized that the sensible thing to do would be to abstract your tests into a single test that can be run against a varying set of data. JUnit 4 allows you to do this with either theories or parameterized tests; here, I'll discuss the latter.

No comments:

Post a Comment