Methods Summary |
---|
private void | runFailTest(java.lang.String value)Run a failure test. value should be invalid.
NonPositiveInteger oNonPositiveInteger = null;
try {
oNonPositiveInteger = new NonPositiveInteger(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.", oNonPositiveInteger);
|
private void | runPassTest(java.lang.String value)Run a successful test. value should be valid.
NonPositiveInteger oNonPositiveInteger = null;
try {
oNonPositiveInteger = new NonPositiveInteger(value);
}
catch (Exception e) { // catch the validation exception
}
assertEquals("unsigned int not equal" +
value, oNonPositiveInteger.toString(), value);
|
public void | testAboveMaxInclusive()Test that a number above MaxInclusive fails
runFailTest("1");
|
public void | testMaxInclusive()Test that a number at MaxInclusive succeeds
runPassTest("0");
|
public void | testPositiveValue()Test that a positive number fails
runFailTest("123");
|
public void | testnonPositiveValue()Test that a Negative value succeeeds
runPassTest("-12345678901234567890");
|