use of jmri.Turnout in project JMRI by JMRI.
the class EasyDccTurnoutManagerTest method testAsAbstractFactory.
@Test
public void testAsAbstractFactory() {
// ask for a Turnout, and check type
Turnout o = l.newTurnout("ET21", "my name");
if (log.isDebugEnabled()) {
log.debug("received turnout value " + o);
}
Assert.assertTrue(null != (EasyDccTurnout) o);
// make sure loaded into tables
if (log.isDebugEnabled()) {
log.debug("by system name: " + l.getBySystemName("ET21"));
}
if (log.isDebugEnabled()) {
log.debug("by user name: " + l.getByUserName("my name"));
}
Assert.assertTrue(null != l.getBySystemName("ET21"));
Assert.assertTrue(null != l.getByUserName("my name"));
}
use of jmri.Turnout in project JMRI by JMRI.
the class XBeeTurnoutManagerTest method testDefaultSystemName.
@Override
@Test
public void testDefaultSystemName() {
// create
Turnout t = l.provideTurnout("ABCT2:" + getNumToTest1());
// check
Assert.assertTrue("real object returned ", t != null);
Assert.assertTrue("system name correct ", t == l.getBySystemName(getSystemName(getNumToTest1())));
}
use of jmri.Turnout in project JMRI by JMRI.
the class SerialTurnoutManagerTest method testAsAbstractFactory.
@Test
public void testAsAbstractFactory() {
// ask for a Turnout, and check type
Turnout o = l.newTurnout("KT21", "my name");
if (log.isDebugEnabled()) {
log.debug("received turnout value " + o);
}
Assert.assertTrue(null != (SerialTurnout) o);
// make sure loaded into tables
if (log.isDebugEnabled()) {
log.debug("by system name: " + l.getBySystemName("KT21"));
}
if (log.isDebugEnabled()) {
log.debug("by user name: " + l.getByUserName("my name"));
}
Assert.assertTrue(null != l.getBySystemName("KT21"));
Assert.assertTrue(null != l.getByUserName("my name"));
}
use of jmri.Turnout in project JMRI by JMRI.
the class NceTurnoutManagerTest method testAsAbstractFactory.
@Test
public void testAsAbstractFactory() {
// ask for a Turnout, and check type
Turnout o = l.newTurnout("NT21", "my name");
if (log.isDebugEnabled()) {
log.debug("received turnout value " + o);
}
Assert.assertTrue(null != (NceTurnout) o);
// make sure loaded into tables
if (log.isDebugEnabled()) {
log.debug("by system name: " + l.getBySystemName("NT21"));
}
if (log.isDebugEnabled()) {
log.debug("by user name: " + l.getByUserName("my name"));
}
Assert.assertTrue(null != l.getBySystemName("NT21"));
Assert.assertTrue(null != l.getByUserName("my name"));
}
use of jmri.Turnout in project JMRI by JMRI.
the class SerialTurnoutManagerTest method testAsAbstractFactory.
@Test
public void testAsAbstractFactory() {
// ask for a Turnout, and check type
Turnout o = l.newTurnout("PTB1", "my name");
if (log.isDebugEnabled()) {
log.debug("received turnout value " + o);
}
Assert.assertTrue(null != (SerialTurnout) o);
// make sure loaded into tables
if (log.isDebugEnabled()) {
log.debug("by system name: " + l.getBySystemName("PTB1"));
}
if (log.isDebugEnabled()) {
log.debug("by user name: " + l.getByUserName("my name"));
}
Assert.assertTrue(null != l.getBySystemName("PTB1"));
Assert.assertTrue(null != l.getByUserName("my name"));
}
Aggregations