Search in sources :

Example 1 with TestTrafficController

use of jmri.jmrix.can.TestTrafficController in project JMRI by JMRI.

the class CbusComponentFactoryTest method setUp.

@Before
public void setUp() {
    Log4JFixture.setUp();
    JUnitUtil.resetInstanceManager();
    tc = new TestTrafficController();
    m = new CanSystemConnectionMemo();
    m.setSystemPrefix("ABC");
}
Also used : TestTrafficController(jmri.jmrix.can.TestTrafficController) CanSystemConnectionMemo(jmri.jmrix.can.CanSystemConnectionMemo) Before(org.junit.Before)

Example 2 with TestTrafficController

use of jmri.jmrix.can.TestTrafficController in project JMRI by JMRI.

the class CbusSensorTest method testLocalChange.

public void testLocalChange() throws jmri.JmriException {
    // load dummy TrafficController
    TestTrafficController t = new TestTrafficController();
    CbusSensor s = new CbusSensor("MS", "+1;-1", t);
    t.rcvMessage = null;
    s.setKnownState(Sensor.ACTIVE);
    Assert.assertTrue(s.getKnownState() == Sensor.ACTIVE);
    Assert.assertTrue(new CbusAddress("+1").match(t.rcvMessage));
    t.rcvMessage = null;
    s.setKnownState(Sensor.INACTIVE);
    Assert.assertTrue(s.getKnownState() == Sensor.INACTIVE);
    Assert.assertTrue(new CbusAddress("-1").match(t.rcvMessage));
}
Also used : TestTrafficController(jmri.jmrix.can.TestTrafficController)

Example 3 with TestTrafficController

use of jmri.jmrix.can.TestTrafficController in project JMRI by JMRI.

the class CanComponentFactoryTest method setUp.

@Before
public void setUp() {
    Log4JFixture.setUp();
    JUnitUtil.resetInstanceManager();
    tc = new TestTrafficController();
    m = new CanSystemConnectionMemo();
    m.setSystemPrefix("ABC");
}
Also used : TestTrafficController(jmri.jmrix.can.TestTrafficController) CanSystemConnectionMemo(jmri.jmrix.can.CanSystemConnectionMemo) Before(org.junit.Before)

Example 4 with TestTrafficController

use of jmri.jmrix.can.TestTrafficController in project JMRI by JMRI.

the class CanMenuTest method setUp.

@Before
public void setUp() {
    Log4JFixture.setUp();
    JUnitUtil.resetInstanceManager();
    tc = new TestTrafficController();
    m = new CanSystemConnectionMemo();
    m.setSystemPrefix("ABC");
}
Also used : TestTrafficController(jmri.jmrix.can.TestTrafficController) CanSystemConnectionMemo(jmri.jmrix.can.CanSystemConnectionMemo) Before(org.junit.Before)

Example 5 with TestTrafficController

use of jmri.jmrix.can.TestTrafficController in project JMRI by JMRI.

the class CbusMenuTest method setUp.

@Before
public void setUp() {
    Log4JFixture.setUp();
    JUnitUtil.resetInstanceManager();
    tc = new TestTrafficController();
    m = new CanSystemConnectionMemo();
    m.setSystemPrefix("ABC");
}
Also used : TestTrafficController(jmri.jmrix.can.TestTrafficController) CanSystemConnectionMemo(jmri.jmrix.can.CanSystemConnectionMemo) Before(org.junit.Before)

Aggregations

TestTrafficController (jmri.jmrix.can.TestTrafficController)15 CanSystemConnectionMemo (jmri.jmrix.can.CanSystemConnectionMemo)7 Before (org.junit.Before)7 CanMessage (jmri.jmrix.can.CanMessage)1