testRangeValues(range_spec, good_values, bad_values);
testRangeValues("@"+range_spec, bad_values, good_values);
}
private void testRangeValues(String range_spec, double[] good_values, double[] bad_values) {
NagiosRange range = new NagiosRange(range_spec);
for (double value:good_values)
{
assertTrue("range="+range_spec+" value="+value, range.isValueOK(value));
}
for (double value:bad_values)
{
assertFalse("range="+range_spec+" value="+value, range.isValueOK(value));
}
}