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);
}
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));
}
Aggregations