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