Skip to content

Utilitity library for testing stuff that I use in multiple projects

License

Notifications You must be signed in to change notification settings

kgyovai/commons-test

 
 

Repository files navigation

Build Status Gradle Status Release Maven Central Maven Central

This is a small library of code-pieces that I find useful when writing tests.

It covers areas that I miss in JUnit itself e.g. for verifying compare()/hashCode()/equals() implementations and for multi-threaded tests.

Contents

  • MockSMTPServer - simulate an SMTP Server for testing code which sends emails
  • MockRESTServer - simulate a HTTP Server for testing code which accesses other systems, e.g. to mock REST interfaces in tests
  • TestHelpers - small utilities for testing things like equals(), hashCode(), toString(), compare() and implementations of Comparator, they ensure some things that the Java spec mandates
  • ThreadTestHelpers - easily run unit tests multiple times in parallel to ensure the code does not contain hidden race conditions
  • MemoryLeakVerifier - a simple way of adding memory leak assertions to unit tests
  • TestEnvironment - handling temporary files/directories in a clean way, ensure that files are not locked any more at the end of the test

Use it

Gradle

compile 'org.dstadler:commons-test:1.+'

Change it

Grab it

git clone git://github.com/centic9/commons-test

Create Eclipse project files

./gradlew eclipse

Build it and run tests

cd commons-test
./gradlew check jacocoTestReport

Licensing

  • commons-test is licensed under the BSD 2-Clause License.
  • A few pieces are imported from other sources, the source-files contain the necessary license pieces/references.

About

Utilitity library for testing stuff that I use in multiple projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%