it’s common sense to test a single class inside of a unit test. you mostly hear about ‘class under test’ when talking about what to test and how to organize a unit test. have you ever wondered then why it’s called ‘unit’ test and not ‘class’ test? being pragmatic (well, of course we all are pragmatic and agile these days, aren’t we?), why not having a more coarse-grained unit than a class under test?
for example, you may have asked yourself more than one time, why not use JUnit for integration tests as well. having used FIT (Framework for Integrated Tests) as a very productive tool for such tests in the past, i wished to have a similar little brother for direct use within JUnit (let’s say for developer integration tests).
Especially when it comes to a wide range of combinations of input or setup data for the unit under test, an equivalent of FIT’s ColumFixture would be of great value. Read the rest of this entry »