Junit-Support
What is it?
Junit-Support provides base classes for JUnit tests to cover common tests.
- Test bean classes: Do all setters correspond to their getters? Do copy constructors cover all bean properties? Are
equals()
andhashCode()
implemented correctly? - Test delegate classes: Do methods expected to call the delegate actually call the delegate?
- Test exception classes: Do the standard exception constructors exist and work as expected?
Usage
Maven dependency:
<dependency>
<groupId>de.mklinger.commons</groupId>
<artifactId>junit-support</artifactId>
<version>0.12</version>
</dependency>
For a given bean class MyBean
a basic test looks like this:
public class MyBeanTest extends BeanTestBase<MyBean> {
}
License
Junit-Support is licensed under Apache License 2.0