assertFalse(monitor.getNotify());
}
public void testSetThreshold() throws Exception
{
CounterMonitor monitor = (CounterMonitor)createMonitor();
try
{
monitor.setThreshold(new Integer(-1));
fail();
}
catch (IllegalArgumentException x)
{
}
try
{
monitor.setInitThreshold(new Integer(-1));
fail();
}
catch (IllegalArgumentException x)
{
}
Integer threshold = new Integer(1);
monitor.setThreshold(threshold);
assertEquals(monitor.getInitThreshold(), threshold);
threshold = new Integer(2);
monitor.setInitThreshold(threshold);
assertEquals(monitor.getInitThreshold(), threshold);
}