use of jmri.jmrix.can.TrafficControllerScaffold in project JMRI by JMRI.
the class CbusReporterTest method testCTor.
@Test
public void testCTor() {
CbusReporter t = new CbusReporter(1, new TrafficControllerScaffold(), "Test");
Assert.assertNotNull("exists", t);
}
use of jmri.jmrix.can.TrafficControllerScaffold in project JMRI by JMRI.
the class CbusDccProgrammerTest method testCTor.
@Test
public void testCTor() {
CbusDccProgrammer t = new CbusDccProgrammer(new TrafficControllerScaffold());
Assert.assertNotNull("exists", t);
}
use of jmri.jmrix.can.TrafficControllerScaffold in project JMRI by JMRI.
the class CbusLightTest method testCTor.
@Test
public void testCTor() {
CbusLight t = new CbusLight("ML", "+1;-1", new TrafficControllerScaffold());
Assert.assertNotNull("exists", t);
}
use of jmri.jmrix.can.TrafficControllerScaffold in project JMRI by JMRI.
the class CbusProgrammerTest method testReadSequence.
public void testReadSequence() throws jmri.ProgrammerException {
TrafficControllerScaffold tc = new TrafficControllerScaffold();
CbusProgrammer p = new CbusProgrammer(3, tc);
reply = false;
rcvdValue = -2;
rcvdStatus = -2;
p.readCV(4, testListener);
Assert.assertEquals("listeners", 0, tc.numListeners());
Assert.assertEquals("sent count", 1, tc.outbound.size());
Assert.assertEquals("content 1", "71 00 03 04", tc.outbound.get(0).toString());
Assert.assertTrue("listener not invoked", !reply);
// pretend reply from CAN
int[] frame = new int[] { 0x97, 0, 3, 5 };
CanReply f = new CanReply(frame);
p.reply(f);
Assert.assertTrue("listener invoked", reply);
Assert.assertEquals("status", 0, rcvdStatus);
Assert.assertEquals("value", 5, rcvdValue);
}
use of jmri.jmrix.can.TrafficControllerScaffold 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);
}
Aggregations