@Test public void shouldNotAddEqualThresholds() { assertEquals(0, notifier.getThresholdSize()); SingleThreshold threshold1 = new SingleThreshold("load_one", SingleThreshold.MAX, 3); SingleThreshold threshold2 = new SingleThreshold("load_one", SingleThreshold.MAX, 3); notifier.addThreshold("default", threshold1); notifier.addThreshold("default", threshold2); assertEquals(1, notifier.getThresholdSize()); }
@Test public void shouldAddOneDoubleThreshold() { DoubleThreshold threshold = new DoubleThreshold("load_five", DoubleThreshold.BETWEEN, 1, 1.1); notifier.addThreshold("default", threshold); assertEquals(1, notifier.getThresholdSize()); }
@Test public void shouldAddOneSingleThreshold() { SingleThreshold threshold = new SingleThreshold("load_one", SingleThreshold.MAX, 3); notifier.addThreshold("default", threshold); assertEquals(1, notifier.getThresholdSize()); }