TestTwopublic class TestTwo extends TestCase
Methods Summary |
---|
public void | runTests()
declare("testCreate");
testCreate();
declare("testCheckValueIndefinite");
testCheckValueIndefinite();
declare("testCheckValueAbove");
testCheckValueAbove();
declare("testCheckValueBelow");
testCheckValueBelow();
| public void | testCheckValueAbove()
Gauge g = new Gauge("GaugeTest", true, 47, 29);
// value above top of range should get set to MAX
g.setMaxValue(22);
assertEquals(22, g.value);
| public void | testCheckValueBelow()
Gauge g = new Gauge("GaugeTest", true, 100, 50);
// value less than zero should get set to zero
g.setValue(-17);
assertEquals(0, g.value);
| public void | testCheckValueIndefinite()
Gauge g = new Gauge("GaugeTest", false, 100, 50);
// value out of range should get set to CONTINUOUS_IDLE
g.setMaxValue(Gauge.INDEFINITE);
assertEquals(Gauge.CONTINUOUS_IDLE, g.value);
| public void | testCreate()
Gauge g = new Gauge("GaugeTest", true, 100, 50);
assertEquals(100, g.maxValue);
assertEquals(50, g.value);
assertNotNull(g.gaugeLF);
assertTrue(g.interactive);
|
|