Search in sources :

Example 21 with AlarmImpl

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);
}
Also used : Alarm(cern.laser.business.data.Alarm) AlarmImpl(cern.laser.business.data.AlarmImpl)

Example 22 with AlarmImpl

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);
}
Also used : Alarm(cern.laser.business.data.Alarm) AlarmImpl(cern.laser.business.data.AlarmImpl)

Example 23 with AlarmImpl

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);
}
Also used : Alarm(cern.laser.business.data.Alarm) AlarmImpl(cern.laser.business.data.AlarmImpl)

Example 24 with AlarmImpl

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]));
    }
}
Also used : Alarm(cern.laser.business.data.Alarm) AlarmImpl(cern.laser.business.data.AlarmImpl)

Example 25 with AlarmImpl

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);
}
Also used : Alarm(cern.laser.business.data.Alarm) AlarmImpl(cern.laser.business.data.AlarmImpl)

Aggregations

AlarmImpl (cern.laser.business.data.AlarmImpl)25 Alarm (cern.laser.business.data.Alarm)13 Triplet (cern.laser.business.data.Triplet)8 ResponsiblePerson (cern.laser.business.data.ResponsiblePerson)7 Source (cern.laser.business.data.Source)7 Location (cern.laser.business.data.Location)5 HashSet (java.util.HashSet)5 Category (cern.laser.business.data.Category)4 Building (cern.laser.business.data.Building)3 CategoryImpl (cern.laser.business.data.CategoryImpl)3 StatusImpl (cern.laser.business.data.StatusImpl)3 SourceDefinition (cern.laser.business.definition.data.SourceDefinition)3 MalformedURLException (java.net.MalformedURLException)3 Timestamp (java.sql.Timestamp)3 ArrayList (java.util.ArrayList)3 Iterator (java.util.Iterator)3 Properties (java.util.Properties)3 Contact (alma.acs.alarmsystem.generated.Contact)2 FaultCode (alma.acs.alarmsystem.generated.FaultCode)2 FaultFamily (alma.acs.alarmsystem.generated.FaultFamily)2