JUnit is a framework written in Java that supports the creation and automation of test cases. It is easy to learn and takes a lot of work of writing and managing test cases. In particular, only the logic for the test cases themselves needs to be implemented. Thereby the framework supports various methods with which test assertions can be set up and evaluated.
1 Writing and Running Tests
1.1 Example: A First Unit Test
To test an application class, a corresponding test class is usually written. Often you start to validate the ...