Search in sources :

Example 11 with CMRISystemConnectionMemo

use of jmri.jmrix.cmri.CMRISystemConnectionMemo 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)

Example 12 with CMRISystemConnectionMemo

use of jmri.jmrix.cmri.CMRISystemConnectionMemo in project JMRI by JMRI.

the class SerialMonActionTest method testStringCtor.

@Test
public void testStringCtor() {
    Assume.assumeFalse(GraphicsEnvironment.isHeadless());
    SerialMonAction action = new SerialMonAction("C/MRI test Action", new CMRISystemConnectionMemo());
    Assert.assertNotNull("exists", action);
}
Also used : CMRISystemConnectionMemo(jmri.jmrix.cmri.CMRISystemConnectionMemo) Test(org.junit.Test)

Example 13 with CMRISystemConnectionMemo

use of jmri.jmrix.cmri.CMRISystemConnectionMemo in project JMRI by JMRI.

the class ListActionTest method testStringCtor.

@Test
public void testStringCtor() {
    Assume.assumeFalse(GraphicsEnvironment.isHeadless());
    ListAction action = new ListAction("CMRI test Action", new CMRISystemConnectionMemo());
    Assert.assertNotNull("exists", action);
}
Also used : CMRISystemConnectionMemo(jmri.jmrix.cmri.CMRISystemConnectionMemo) Test(org.junit.Test)

Example 14 with CMRISystemConnectionMemo

use of jmri.jmrix.cmri.CMRISystemConnectionMemo in project JMRI by JMRI.

the class ListFrameTest method testMemoCtor.

@Test
public void testMemoCtor() {
    Assume.assumeFalse(GraphicsEnvironment.isHeadless());
    ListFrame action = new ListFrame(new CMRISystemConnectionMemo());
    Assert.assertNotNull("exists", action);
}
Also used : CMRISystemConnectionMemo(jmri.jmrix.cmri.CMRISystemConnectionMemo) Test(org.junit.Test)

Example 15 with CMRISystemConnectionMemo

use of jmri.jmrix.cmri.CMRISystemConnectionMemo in project JMRI by JMRI.

the class NodeConfigFrameTest method testMemoCtor.

@Test
public void testMemoCtor() {
    Assume.assumeFalse(GraphicsEnvironment.isHeadless());
    NodeConfigFrame action = new NodeConfigFrame(new CMRISystemConnectionMemo());
    Assert.assertNotNull("exists", action);
}
Also used : CMRISystemConnectionMemo(jmri.jmrix.cmri.CMRISystemConnectionMemo) Test(org.junit.Test)

Aggregations

CMRISystemConnectionMemo (jmri.jmrix.cmri.CMRISystemConnectionMemo)23 Test (org.junit.Test)16 SerialTrafficController (jmri.jmrix.cmri.serial.SerialTrafficController)5 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)3 NodeConfigAction (jmri.jmrix.cmri.serial.nodeconfig.NodeConfigAction)3 JButton (javax.swing.JButton)2 SerialNode (jmri.jmrix.cmri.serial.SerialNode)2 Element (org.jdom2.Element)2 BoxLayout (javax.swing.BoxLayout)1 JPanel (javax.swing.JPanel)1 SerialTrafficControlScaffold (jmri.jmrix.cmri.serial.SerialTrafficControlScaffold)1 ConnectionConfig (jmri.jmrix.cmri.serial.serialdriver.ConnectionConfig)1 SerialDriverAdapter (jmri.jmrix.cmri.serial.serialdriver.SerialDriverAdapter)1 Ignore (org.junit.Ignore)1