Search in sources :

Example 1 with SerialTrafficControlScaffold

use of jmri.jmrix.cmri.serial.SerialTrafficControlScaffold in project JMRI by JMRI.

the class CMRIComponentFactoryTest method setUp.

// The minimal setup for log4J
@Before
public void setUp() {
    apps.tests.Log4JFixture.setUp();
    jmri.util.JUnitUtil.resetInstanceManager();
    // prepare an interface
    tcis = new SerialTrafficControlScaffold();
    memo = new jmri.jmrix.cmri.CMRISystemConnectionMemo();
    memo.setTrafficController(tcis);
}
Also used : SerialTrafficControlScaffold(jmri.jmrix.cmri.serial.SerialTrafficControlScaffold) Before(org.junit.Before)

Example 2 with SerialTrafficControlScaffold

use of jmri.jmrix.cmri.serial.SerialTrafficControlScaffold in project JMRI by JMRI.

the class ConnectionConfigXmlTest method testStore.

@Test
@Ignore("causes errors")
public void testStore() {
    // tests that store produces an XML element from a new ConnectionConfig object.
    ConnectionConfigXml c = new ConnectionConfigXml();
    SerialDriverAdapter p = new SerialDriverAdapter() {

        /**
               * set up all of the other objects to operate connected to this port
               */
        @Override
        public void configure() {
            // connect to the traffic controller
            SerialTrafficController tc = new SerialTrafficControlScaffold();
            tc.connectPort(this);
            ((CMRISystemConnectionMemo) getSystemConnectionMemo()).setTrafficController(tc);
            ((CMRISystemConnectionMemo) getSystemConnectionMemo()).configureManagers();
        }
    };
    ConnectionConfig cc = new ConnectionConfig(p);
    p.configure();
    c.getInstance(cc);
    Assert.assertNotNull("ConnectionConfigXml store()", c.store(cc));
}
Also used : SerialTrafficController(jmri.jmrix.cmri.serial.SerialTrafficController) CMRISystemConnectionMemo(jmri.jmrix.cmri.CMRISystemConnectionMemo) SerialDriverAdapter(jmri.jmrix.cmri.serial.serialdriver.SerialDriverAdapter) SerialTrafficControlScaffold(jmri.jmrix.cmri.serial.SerialTrafficControlScaffold) ConnectionConfig(jmri.jmrix.cmri.serial.serialdriver.ConnectionConfig) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

SerialTrafficControlScaffold (jmri.jmrix.cmri.serial.SerialTrafficControlScaffold)2 CMRISystemConnectionMemo (jmri.jmrix.cmri.CMRISystemConnectionMemo)1 SerialTrafficController (jmri.jmrix.cmri.serial.SerialTrafficController)1 ConnectionConfig (jmri.jmrix.cmri.serial.serialdriver.ConnectionConfig)1 SerialDriverAdapter (jmri.jmrix.cmri.serial.serialdriver.SerialDriverAdapter)1 Before (org.junit.Before)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1