use of jmri.jmrix.lenz.XNetInterfaceScaffold in project JMRI by JMRI.
the class Z21XNetThrottleTest method testCtor.
@Override
@Test(timeout = 1000)
public void testCtor() {
// infrastructure objects
XNetInterfaceScaffold tc = new XNetInterfaceScaffold(new LenzCommandStation());
Z21XNetThrottle t = new Z21XNetThrottle(new XNetSystemConnectionMemo(tc), tc);
Assert.assertNotNull(t);
}
use of jmri.jmrix.lenz.XNetInterfaceScaffold in project JMRI by JMRI.
the class Z21XNetThrottleTest method testCtorWithArg.
// Test the constructor with an address specified.
@Override
@Test(timeout = 1000)
public void testCtorWithArg() throws Exception {
XNetInterfaceScaffold tc = new XNetInterfaceScaffold(new LenzCommandStation());
Z21XNetThrottle t = new Z21XNetThrottle(new XNetSystemConnectionMemo(tc), new jmri.DccLocoAddress(3, false), tc);
Assert.assertNotNull(t);
}
use of jmri.jmrix.lenz.XNetInterfaceScaffold in project JMRI by JMRI.
the class Z21XNetTurnoutManagerTest method setUp.
@Override
@Before
public void setUp() {
apps.tests.Log4JFixture.setUp();
// prepare an interface, register
lnis = new XNetInterfaceScaffold(new RocoZ21CommandStation());
// create and register the manager object
l = new Z21XNetTurnoutManager(lnis, "X");
jmri.InstanceManager.setTurnoutManager(l);
}
use of jmri.jmrix.lenz.XNetInterfaceScaffold in project JMRI by JMRI.
the class Z21XNetTurnoutManagerTest method testAsAbstractFactory.
@Test
public void testAsAbstractFactory() {
lnis = new XNetInterfaceScaffold(new RocoZ21CommandStation());
// create and register the manager object
Z21XNetTurnoutManager l = new Z21XNetTurnoutManager(lnis, "X");
jmri.InstanceManager.setTurnoutManager(l);
// ask for a Turnout, and check type
TurnoutManager t = jmri.InstanceManager.turnoutManagerInstance();
Turnout o = t.newTurnout("XT21", "my name");
if (log.isDebugEnabled()) {
log.debug("received turnout value " + o);
}
Assert.assertTrue(null != (Z21XNetTurnout) o);
// make sure loaded into tables
if (log.isDebugEnabled()) {
log.debug("by system name: " + t.getBySystemName("XT21"));
}
if (log.isDebugEnabled()) {
log.debug("by user name: " + t.getByUserName("my name"));
}
Assert.assertTrue(null != t.getBySystemName("XT21"));
Assert.assertTrue(null != t.getByUserName("my name"));
}
use of jmri.jmrix.lenz.XNetInterfaceScaffold in project JMRI by JMRI.
the class ZTC611XNetTurnoutManagerTest method setUp.
@Override
@Before
public void setUp() {
apps.tests.Log4JFixture.setUp();
jmri.util.JUnitUtil.resetInstanceManager();
// prepare an interface, register
lnis = new XNetInterfaceScaffold(new LenzCommandStation());
// create and register the manager object
l = new ZTC611XNetTurnoutManager(lnis, "X");
jmri.InstanceManager.setTurnoutManager(l);
}
Aggregations