Search in sources :

Example 6 with XNetSystemConnectionMemo

use of jmri.jmrix.lenz.XNetSystemConnectionMemo 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);
}
Also used : XNetInterfaceScaffold(jmri.jmrix.lenz.XNetInterfaceScaffold) XNetSystemConnectionMemo(jmri.jmrix.lenz.XNetSystemConnectionMemo) LenzCommandStation(jmri.jmrix.lenz.LenzCommandStation) Test(org.junit.Test) XNetThrottleTest(jmri.jmrix.lenz.XNetThrottleTest)

Example 7 with XNetSystemConnectionMemo

use of jmri.jmrix.lenz.XNetSystemConnectionMemo 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);
}
Also used : XNetInterfaceScaffold(jmri.jmrix.lenz.XNetInterfaceScaffold) XNetSystemConnectionMemo(jmri.jmrix.lenz.XNetSystemConnectionMemo) LenzCommandStation(jmri.jmrix.lenz.LenzCommandStation) Test(org.junit.Test) XNetThrottleTest(jmri.jmrix.lenz.XNetThrottleTest)

Example 8 with XNetSystemConnectionMemo

use of jmri.jmrix.lenz.XNetSystemConnectionMemo in project JMRI by JMRI.

the class LI100XNetInitializationManagerTest method testCtor.

public void testCtor() {
    // infrastructure objects
    XNetInterfaceScaffold t = new XNetInterfaceScaffold(new LenzCommandStation());
    XNetListenerScaffold l = new XNetListenerScaffold();
    XNetSystemConnectionMemo memo = new XNetSystemConnectionMemo(t);
    LI100XNetInitializationManager m = new LI100XNetInitializationManager(memo) {

        @Override
        protected int getInitTimeout() {
            // shorten, because this will fail & delay test
            return 50;
        }
    };
    Assert.assertNotNull("exists", t);
    Assert.assertNotNull("exists", l);
    Assert.assertNotNull("exists", m);
    Assert.assertNotNull("exists", memo);
    jmri.util.JUnitAppender.assertWarnMessage("Command Station disconnected, or powered down assuming LZ100/LZV100 V3.x");
}
Also used : XNetInterfaceScaffold(jmri.jmrix.lenz.XNetInterfaceScaffold) XNetListenerScaffold(jmri.jmrix.lenz.XNetListenerScaffold) XNetSystemConnectionMemo(jmri.jmrix.lenz.XNetSystemConnectionMemo) LenzCommandStation(jmri.jmrix.lenz.LenzCommandStation)

Example 9 with XNetSystemConnectionMemo

use of jmri.jmrix.lenz.XNetSystemConnectionMemo in project JMRI by JMRI.

the class EliteXNetInitializationManagerTest method testCtor.

public void testCtor() {
    // infrastructure objects
    XNetInterfaceScaffold t = new XNetInterfaceScaffold(new HornbyEliteCommandStation());
    XNetListenerScaffold l = new XNetListenerScaffold();
    XNetSystemConnectionMemo memo = new XNetSystemConnectionMemo(t);
    EliteXNetInitializationManager m = new EliteXNetInitializationManager(memo) {

        @Override
        protected int getInitTimeout() {
            // shorten, because this will fail & delay test
            return 50;
        }
    };
    Assert.assertNotNull("exists", t);
    Assert.assertNotNull("exists", l);
    Assert.assertNotNull("exists", m);
    Assert.assertNotNull("exists", memo);
}
Also used : XNetInterfaceScaffold(jmri.jmrix.lenz.XNetInterfaceScaffold) XNetListenerScaffold(jmri.jmrix.lenz.XNetListenerScaffold) XNetSystemConnectionMemo(jmri.jmrix.lenz.XNetSystemConnectionMemo)

Example 10 with XNetSystemConnectionMemo

use of jmri.jmrix.lenz.XNetSystemConnectionMemo in project JMRI by JMRI.

the class EliteXNetThrottleManagerTest method setUp.

// The minimal setup for log4J
@Override
@Before
public void setUp() {
    apps.tests.Log4JFixture.setUp();
    jmri.util.JUnitUtil.resetInstanceManager();
    XNetInterfaceScaffold tc = new XNetInterfaceScaffold(new HornbyEliteCommandStation());
    tm = new EliteXNetThrottleManager(new XNetSystemConnectionMemo(tc));
}
Also used : XNetInterfaceScaffold(jmri.jmrix.lenz.XNetInterfaceScaffold) XNetSystemConnectionMemo(jmri.jmrix.lenz.XNetSystemConnectionMemo) Before(org.junit.Before)

Aggregations

XNetInterfaceScaffold (jmri.jmrix.lenz.XNetInterfaceScaffold)13 XNetSystemConnectionMemo (jmri.jmrix.lenz.XNetSystemConnectionMemo)13 LenzCommandStation (jmri.jmrix.lenz.LenzCommandStation)11 Test (org.junit.Test)6 XNetListenerScaffold (jmri.jmrix.lenz.XNetListenerScaffold)4 Before (org.junit.Before)4 XNetThrottleTest (jmri.jmrix.lenz.XNetThrottleTest)2