The most important thing is to write tests like
(expectedResult == obtainedResult)
or
expectedResult.equals(obtainedResult)
You can do that without JUnit, of course. For the purpose of this document, I will call the smallest unit of testing, like the expression above, a test expression . All that JUnit does is give you flexibility in grouping your test expressions and convenient ways to capture and/or summarize test failures.
$Revision: 2422 $
Copyright © 2008, 2009
Axis Data Management Corp.