use of cern.laser.business.data.AlarmImpl in project ACS by ACS-Community.
the class ReductionRuleTest method testGetParent.
public void testGetParent() {
Alarm alarm = new AlarmImpl();
ReductionRule rr = new ReductionRule(alarm);
assertNotNull(rr);
Alarm alarm2 = rr.getParent();
assertNotNull(alarm2);
assertEquals(alarm, alarm2);
}
use of cern.laser.business.data.AlarmImpl in project ACS by ACS-Community.
the class ReductionRuleTest method testReductionRule.
public void testReductionRule() {
Alarm alarm = new AlarmImpl();
ReductionRule rr = new ReductionRule(alarm);
assertNotNull(rr);
}
use of cern.laser.business.data.AlarmImpl in project ACS by ACS-Community.
the class ReductionRuleTest method testSetIsNodeReduction.
public void testSetIsNodeReduction() {
Alarm alarm = new AlarmImpl();
ReductionRule rr = new ReductionRule(alarm);
rr.setIsNodeReduction(true);
boolean v = rr.getIsNodeReduction();
assertEquals(v, true);
rr.setIsNodeReduction(false);
v = rr.getIsNodeReduction();
assertEquals(v, false);
}
use of cern.laser.business.data.AlarmImpl in project ACS by ACS-Community.
the class ReductionRuleTest method testAddGetChildren.
public void testAddGetChildren() {
Alarm alarm = new AlarmImpl();
ReductionRule rr = new ReductionRule(alarm);
Alarm[] alarms = new Alarm[10];
for (int i = 0; i != 10; i++) {
alarms[i] = new AlarmImpl();
rr.addChild(alarms[i]);
}
List<Alarm> children = rr.getChildren();
assertEquals(children.size(), 10);
for (int i = 0; i != 10; i++) {
assertTrue(children.contains(alarms[i]));
}
}
use of cern.laser.business.data.AlarmImpl in project ACS by ACS-Community.
the class ReductionRuleTest method testSetTreshold.
public void testSetTreshold() {
Alarm alarm = new AlarmImpl();
ReductionRule rr = new ReductionRule(alarm);
rr.setThreshold(10);
int v = rr.getThreshold();
assertEquals(v, 10);
rr.setThreshold(2);
v = rr.getThreshold();
assertEquals(v, 2);
}
Aggregations