use of jmri.jmrix.can.CanSystemConnectionMemo in project JMRI by JMRI.
the class GcPortControllerTest method setUp.
@Override
@Before
public void setUp() {
apps.tests.Log4JFixture.setUp();
JUnitUtil.resetInstanceManager();
CanSystemConnectionMemo memo = new CanSystemConnectionMemo();
apc = new GcPortController(memo) {
@Override
public boolean status() {
return true;
}
@Override
public void configure() {
}
@Override
public java.io.DataInputStream getInputStream() {
return null;
}
@Override
public java.io.DataOutputStream getOutputStream() {
return null;
}
/**
* Get an array of valid baud rates; used to display valid options.
*/
@Override
public String[] validBaudRates() {
String[] retval = { "9600" };
return retval;
}
/**
* Open a specified port. The appname argument is to be provided to the
* underlying OS during startup so that it can show on status displays, etc
*/
@Override
public String openPort(String portName, String appName) {
return "";
}
};
}
use of jmri.jmrix.can.CanSystemConnectionMemo in project JMRI by JMRI.
the class CbusPowerManagerTest method testCTor.
@Test
public void testCTor() {
TrafficControllerScaffold tc = new TrafficControllerScaffold();
CanSystemConnectionMemo memo = new CanSystemConnectionMemo();
memo.setTrafficController(tc);
CbusPowerManager t = new CbusPowerManager(memo);
Assert.assertNotNull("exists", t);
}
use of jmri.jmrix.can.CanSystemConnectionMemo in project JMRI by JMRI.
the class CbusDccProgrammerManagerTest method testCTor.
@Test
public void testCTor() {
TrafficControllerScaffold tc = new TrafficControllerScaffold();
CanSystemConnectionMemo memo = new CanSystemConnectionMemo();
memo.setTrafficController(tc);
CbusDccProgrammerManager t = new CbusDccProgrammerManager(new CbusDccProgrammer(tc), memo);
Assert.assertNotNull("exists", t);
}
use of jmri.jmrix.can.CanSystemConnectionMemo in project JMRI by JMRI.
the class CbusLightManagerTest method testCTor.
@Test
public void testCTor() {
TrafficControllerScaffold tc = new TrafficControllerScaffold();
CanSystemConnectionMemo memo = new CanSystemConnectionMemo();
memo.setTrafficController(tc);
CbusLightManager t = new CbusLightManager(memo);
Assert.assertNotNull("exists", t);
}
use of jmri.jmrix.can.CanSystemConnectionMemo in project JMRI by JMRI.
the class MonitorPaneTest method testDisplay.
@Test
public void testDisplay() throws Exception {
TrafficControllerScaffold tcs = new TrafficControllerScaffold();
MonitorPane f = new MonitorPane();
CanSystemConnectionMemo memo = new CanSystemConnectionMemo();
memo.setTrafficController(tcs);
f.initComponents(memo);
//pane.MonitorPane.Default;
/*MonitorFrame f = new MonitorFrame(){
{ rawCheckBox.setSelected(true);}
};
f.initComponents();
f.setVisible(true);*/
// show std message
CanMessage m = new CanMessage(0x123);
m.setNumDataElements(3);
m.setElement(0, (byte) 0x02);
m.setElement(1, (byte) 0xA2);
m.setElement(2, (byte) 0x31);
f.message(m);
// show ext message
m = new CanMessage(0x654321);
m.setExtended(true);
m.setNumDataElements(3);
m.setElement(0, (byte) 0x02);
m.setElement(1, (byte) 0xA2);
m.setElement(2, (byte) 0x31);
f.message(m);
// show reply
CanReply r = new CanReply();
r.setNumDataElements(3);
r.setElement(0, (byte) 0x11);
r.setElement(1, (byte) 0x82);
r.setElement(2, (byte) 0x33);
f.reply(r);
// close panel
f.dispose();
memo.dispose();
}
Aggregations