nl.lxtreme.ols.test
Class UnitTestUtils

java.lang.Object
  extended by nl.lxtreme.ols.test.UnitTestUtils

public final class UnitTestUtils
extends Object

Provides some additional test methods to JUnit.


Method Summary
static void assertRange(double aLowerBound, double aUpperBound, double aValue)
          Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.
static void assertRange(int aLowerBound, int aUpperBound, int aValue)
          Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.
static void assertRange(long aLowerBound, long aUpperBound, long aValue)
          Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.
static void assertRange(String aMessage, double aLowerBound, double aUpperBound, double aValue)
          Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.
static void assertRange(String aMessage, int aLowerBound, int aUpperBound, int aValue)
          Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.
static void assertRange(String aMessage, long aLowerBound, long aUpperBound, long aValue)
          Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

assertRange

public static void assertRange(double aLowerBound,
                               double aUpperBound,
                               double aValue)
Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.

Parameters:
aLowerBound - the lower boundary;
aUpperBound - the upper boundary;
aValue - the value to test.

assertRange

public static void assertRange(int aLowerBound,
                               int aUpperBound,
                               int aValue)
Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.

Parameters:
aLowerBound - the lower boundary;
aUpperBound - the upper boundary;
aValue - the value to test.

assertRange

public static void assertRange(long aLowerBound,
                               long aUpperBound,
                               long aValue)
Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.

Parameters:
aLowerBound - the lower boundary;
aUpperBound - the upper boundary;
aValue - the value to test.

assertRange

public static void assertRange(String aMessage,
                               double aLowerBound,
                               double aUpperBound,
                               double aValue)
Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.

Parameters:
aMessage - the message to print when the assertion fails;
aLowerBound - the lower boundary;
aUpperBound - the upper boundary;
aValue - the value to test.

assertRange

public static void assertRange(String aMessage,
                               int aLowerBound,
                               int aUpperBound,
                               int aValue)
Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.

Parameters:
aMessage - the message to print when the assertion fails;
aLowerBound - the lower boundary;
aUpperBound - the upper boundary;
aValue - the value to test.

assertRange

public static void assertRange(String aMessage,
                               long aLowerBound,
                               long aUpperBound,
                               long aValue)
Asserts that a given value is within the given boundaries, that is, aLowerBound <= aValue <= aUpperBound.

Parameters:
aMessage - the message to print when the assertion fails;
aLowerBound - the lower boundary;
aUpperBound - the upper boundary;
aValue - the value to test.


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.