Search in sources :

Example 11 with NamedBeanHandle

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);
}
Also used : Turnout(jmri.Turnout) NamedBeanHandle(jmri.NamedBeanHandle) Test(org.junit.Test)

Example 12 with NamedBeanHandle

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);
}
Also used : Turnout(jmri.Turnout) NamedBeanHandle(jmri.NamedBeanHandle) Test(org.junit.Test)

Aggregations

NamedBeanHandle (jmri.NamedBeanHandle)12 Turnout (jmri.Turnout)9 Test (org.junit.Test)8 Sensor (jmri.Sensor)4 SignalMast (jmri.SignalMast)4 Hashtable (java.util.Hashtable)3 Block (jmri.Block)3 SignalMastLogic (jmri.SignalMastLogic)3 SignalMastLogicManager (jmri.SignalMastLogicManager)2 Element (org.jdom2.Element)2 JFrame (javax.swing.JFrame)1 Route (jmri.Route)1 Section (jmri.Section)1 SignalMastManager (jmri.SignalMastManager)1 DoubleTurnoutSignalHead (jmri.implementation.DoubleTurnoutSignalHead)1 QuadOutputSignalHead (jmri.implementation.QuadOutputSignalHead)1 SE8cSignalHead (jmri.implementation.SE8cSignalHead)1 LayoutBlockManager (jmri.jmrit.display.layoutEditor.LayoutBlockManager)1