| |
| | Diasparsoft |
 | | Specifically, each JUnit test is implemented as a method that "asks no quarter and offers none." In other words, it takes no parameters and returns no value. |
 | | The JUnit philosophy is that ultimately, it does not matter how many ways a test fails, it only matters that the test fails. |
 | | Now that you know how JUnit detects whether a test passes or fails, you can write a test that verifies whether an exception is thrown: verify that the test's execution path ends up inside the exception handler for the exception you expect, and call fail() if the test's execution path does not get there. |
| www.diasparsoftware.com /template.php?content=jUnitStarterGuide (5973 words) |
|