Methods Summary |
---|
public void | TestPositiveValue()Test that a positive value succeeeds
runPassTest("12345678901234567890");
|
private void | runFailTest(java.lang.String value)Run a failure test. value should be invalid.
PositiveInteger oPositiveInteger = null;
try {
oPositiveInteger = new PositiveInteger(value);
}
catch (Exception e) { // catch the validation exception
}
// object is not iNstantiated on bad data value
assertNull("validation restriction failed [" +
value + "]. did not restrict bad value.", oPositiveInteger);
|
private void | runPassTest(java.lang.String value)Run a successful test. value should be valid.
PositiveInteger oPositiveInteger = null;
try {
oPositiveInteger = new PositiveInteger(value);
}
catch (Exception e) { // catch the validation exception
}
assertEquals("positive integer not equal" +
value, oPositiveInteger.toString(), value);
|
public void | testBelowMinExclusive()Test that a number less than MinInclusive fails
runFailTest("0");
|
public void | testMinExclusive()Test that a number at MinInclusive succeeds
runPassTest("1");
|
public void | testNegativeValue()Test that a negative number fails
runFailTest("-123");
|