JavaLib
 
Tester
 
Setup
User's Guide
Tester API
Samples
Javadocs
 
Sources
Downloads
 
TSRJ Home
TSRJ Local

Samples for the Tester library

The Java code in these samples constitutes the entire test suite for the tester library. Each package has been designed to test a specific feature of the library. Each package includes a collection of classes needed to create the tests, the Examples class with examples of data needed to design the tests, and, of course, the tests themselves. For each package we also include the complete set of test results: a version with all test results and all data shown, and a version that shows only the failed tests (that were designed to fail).

The examples here have been designed to work with the 1.4.1 version.


Links to the samples of the use of the tester library that illustrate the use of all of the tester's functionality.


  • Tests that compare the basic types. This includes primitive types and wrapper classes.
  • Tests that compare the user types. This includes the equality of two instances of user defined classes.
  • Tests that compare inexact values. This includes comparison of two objects that contain a field with values of types double or float (or their wrapper classes).
  • Tests that compare sets. This includes the comparison of HashSet and TreeSet objects.
  • Tests that compare all elements of two iterable objects.
  • Tests that compare all elements of two traversal objects.
  • Tests that compare all elements of two map objects. This includes tests for HashMap and TreeMap.
  • Tests that compare the random choices. This includes tests to determine whether the data value is OneOf or NoneOf a finite collection of options for both the exact and inexact variants.
  • Tests for range check. This includes tests to determine whether the data value is in the range [low, high) using Comparable objects of given Comparator.
  • Tests to check equivalence of two objects. This includes tests that check whether the two given objects are equivalent according to the user-defined function object that implements the Equivalence interface.
  • Tests for ISame. This includes comparison of two instances of a class that implements the ISame interface by applying the same method defined in that class.
  • Tests for exceptions. This includes tests that determine whether both a method invocation throws the desired exception or a constructor invocation throws the desired exception.
  • Tests for methods. This includes tests to check the expected value produced by a method invocation.

last updated on Fri Apr 1 14:26:43 EDT 2011generated with DrRacket