public class NumericAsserts extends Object
Constructor and Description |
---|
NumericAsserts() |
Modifier and Type | Method and Description |
---|---|
static void |
assertApproximate(double expected,
double actual,
double deltaPercent)
Asserts that the actual value is within the expected, plus/minus the
specified percentage (useful for probabilistic testing).
|
static void |
assertApproximate(int expected,
int actual,
int deltaPercent)
Asserts that the actual value is within the expected, plus/minus the
specified percentage (useful for probabilistic testing).
|
static void |
assertApproximate(long expected,
long actual,
int deltaPercent)
Asserts that the actual value is within the expected, plus/minus the
specified percentage (useful for probabilistic testing).
|
static void |
assertApproximate(String message,
double expected,
double actual,
double deltaPercent)
Asserts that the actual value is within the expected, plus/minus the
specified percentage (useful for probabilistic testing).
|
static void |
assertApproximate(String message,
int expected,
int actual,
int deltaPercent)
Asserts that the actual value is within the expected, plus/minus the
specified percentage (useful for probabilistic testing).
|
static void |
assertApproximate(String message,
long expected,
long actual,
int deltaPercent)
Asserts that the actual value is within the expected, plus/minus the
specified percentage (useful for probabilistic testing).
|
static void |
assertInRange(double expectedLow,
double expectedHigh,
double actual)
Asserts that the actual value is within an arbitrary range +/- the expected value.
|
static void |
assertInRange(int expectedLow,
int expectedHigh,
int actual)
Asserts that the actual value is within an arbitrary range +/- the expected value.
|
static void |
assertInRange(long expectedLow,
long expectedHigh,
long actual)
Asserts that the actual value is within an arbitrary range +/- the expected value.
|
static void |
assertInRange(String message,
double expectedLow,
double expectedHigh,
double actual)
Asserts that the actual value is within an arbitrary range +/- the expected value.
|
static void |
assertInRange(String message,
int expectedLow,
int expectedHigh,
int actual)
Asserts that the actual value is within an arbitrary range +/- the expected value.
|
static void |
assertInRange(String message,
long expectedLow,
long expectedHigh,
long actual)
Asserts that the actual value is within an arbitrary range +/- the expected value.
|
public static void assertApproximate(int expected, int actual, int deltaPercent)
public static void assertApproximate(String message, int expected, int actual, int deltaPercent)
public static void assertApproximate(long expected, long actual, int deltaPercent)
public static void assertApproximate(String message, long expected, long actual, int deltaPercent)
public static void assertApproximate(double expected, double actual, double deltaPercent)
public static void assertApproximate(String message, double expected, double actual, double deltaPercent)
public static void assertInRange(int expectedLow, int expectedHigh, int actual)
public static void assertInRange(String message, int expectedLow, int expectedHigh, int actual)
public static void assertInRange(long expectedLow, long expectedHigh, long actual)
public static void assertInRange(String message, long expectedLow, long expectedHigh, long actual)
public static void assertInRange(double expectedLow, double expectedHigh, double actual)
public static void assertInRange(String message, double expectedLow, double expectedHigh, double actual)