implements Testlet
{
public void test(TestHarness harness)
{
// Check #1: Normal parameters
DefaultBoundedRangeModel dbrm = new DefaultBoundedRangeModel();
dbrm.setRangeProperties(5, 2, 1, 8, false);
check(harness, dbrm, 5, 2, 1, 8, false);
// Check #2: valueIsAdjusting
dbrm.setRangeProperties(5, 2, 1, 8, true);
check(harness, dbrm, 5, 2, 1, 8, true);
// Check #3: extent < 0
dbrm.setRangeProperties(4, -2, -4, 9, false);
check(harness, dbrm, 4, 0, -4, 9, false);
// Check #4: value > maximum
dbrm.setRangeProperties(14, 0, 1, 8, false);
check(harness, dbrm, 14, 0, 1, 14, false);
// Check #5: value + extent > maximum
dbrm.setRangeProperties(5, 4, 1, 8, false);
check(harness, dbrm, 5, 3, 1, 8, false);
// Check #6: value < minimum
dbrm.setRangeProperties(-3, 1, 0, 8, false);
check(harness, dbrm, -3, 1, -3, 8, false);
}