Provides utility classes to make writing JUnit tests easier.

Tags
Site
License

 

This project provides utility classes to make writing JUnit tests easier.

The utilities provided are built against JUnit version 4.8.2 and Hamcrest version 1.3.RC2.

Theories

This project provides a some theories to test proper implementation of common methods like

  1. equals and hashCode: ObjectTheories
  2. toString: ObjectTheories (assuring that it raises no runtime exception)
  3. compareTo: CompareToTheory
  4. serializability: SerializationTheory

Utilities

The utilities provided are currently very few.

  1. File utilities to locate file resources on the class path: FileTestUtils
  2. Calendar utilities creating dates: CalendarTestUtils
  3. Running private constructors for code coverage: LangTestUtils

Matcher for Hamcrest

This library also provides some matchers for Hamcrest.

  1. Stream matcher: StreamsEqualContentAs
  2. Reader matcher: ReadsEqualContentAs

Resources