use of jmri.NamedBeanHandle in project JMRI by JMRI.
the class DoubleTurnoutSignalHeadTest method testCTor.
@Test
public void testCTor() {
Turnout it = (InstanceManager.getDefault(TurnoutManager.class)).provideTurnout("IT1");
NamedBeanHandle<Turnout> green = new NamedBeanHandle<>("green handle", it);
// deliberately use same system name?
Turnout it2 = (InstanceManager.getDefault(TurnoutManager.class)).provideTurnout("IT1");
NamedBeanHandle<Turnout> red = new NamedBeanHandle<>("red handle", it2);
new DoubleTurnoutSignalHead("Test Head", green, red);
//Assert.assertNotNull("exists",t);
}
use of jmri.NamedBeanHandle in project JMRI by JMRI.
the class LsDecSignalHeadTest method testCTor.
@Test
public void testCTor() {
Turnout it = (InstanceManager.getDefault(TurnoutManager.class)).provideTurnout("IT1");
NamedBeanHandle<Turnout> green = new NamedBeanHandle<>("green handle", it);
// deliberately changed names
Turnout it2 = (InstanceManager.getDefault(TurnoutManager.class)).provideTurnout("IT3");
NamedBeanHandle<Turnout> red = new NamedBeanHandle<>("red handle", it2);
// deliberately changed names
Turnout it3 = (InstanceManager.getDefault(TurnoutManager.class)).provideTurnout("IT2");
NamedBeanHandle<Turnout> yellow = new NamedBeanHandle<>("yellow handle", it3);
Turnout it4 = (InstanceManager.getDefault(TurnoutManager.class)).provideTurnout("IT4");
NamedBeanHandle<Turnout> flashgreen = new NamedBeanHandle<>("flash green handle", it4);
Turnout it5 = (InstanceManager.getDefault(TurnoutManager.class)).provideTurnout("IT5");
NamedBeanHandle<Turnout> flashred = new NamedBeanHandle<>("flash red handle", it5);
Turnout it6 = (InstanceManager.getDefault(TurnoutManager.class)).provideTurnout("IT6");
NamedBeanHandle<Turnout> flashyellow = new NamedBeanHandle<>("yellow handle", it6);
Turnout it7 = (InstanceManager.getDefault(TurnoutManager.class)).provideTurnout("IT7");
NamedBeanHandle<Turnout> off = new NamedBeanHandle<>("off handle", it7);
LsDecSignalHead t = new LsDecSignalHead("testSys", "testUser", green, 1, red, 2, yellow, 3, flashgreen, 4, flashred, 5, flashyellow, 6, off, 7);
Assert.assertNotNull("exists", t);
}
Aggregations