Search in sources :

Example 1 with LocoNetInterfaceScaffold

use of jmri.jmrix.loconet.LocoNetInterfaceScaffold in project JMRI by JMRI.

the class UhlenbrockProgrammerManagerTest method testCTor.

@Test
public void testCTor() {
    LnTrafficController lnis = new LocoNetInterfaceScaffold();
    UhlenbrockSlotManager slotmanager = new UhlenbrockSlotManager(lnis);
    UhlenbrockSystemConnectionMemo memo = new UhlenbrockSystemConnectionMemo(lnis, slotmanager);
    UhlenbrockProgrammerManager t = new UhlenbrockProgrammerManager(slotmanager, memo);
    Assert.assertNotNull("exists", t);
}
Also used : UhlenbrockSlotManager(jmri.jmrix.loconet.UhlenbrockSlotManager) LocoNetInterfaceScaffold(jmri.jmrix.loconet.LocoNetInterfaceScaffold) LnTrafficController(jmri.jmrix.loconet.LnTrafficController) Test(org.junit.Test)

Example 2 with LocoNetInterfaceScaffold

use of jmri.jmrix.loconet.LocoNetInterfaceScaffold in project JMRI by JMRI.

the class LocoNetMenuTest method testCTor.

@Test
public void testCTor() {
    LnTrafficController lnis = new LocoNetInterfaceScaffold();
    SlotManager slotmanager = new SlotManager(lnis);
    LocoNetSystemConnectionMemo memo = new LocoNetSystemConnectionMemo(lnis, slotmanager);
    LocoNetMenu t = new LocoNetMenu(memo);
    Assert.assertNotNull("exists", t);
}
Also used : SlotManager(jmri.jmrix.loconet.SlotManager) LocoNetInterfaceScaffold(jmri.jmrix.loconet.LocoNetInterfaceScaffold) LocoNetSystemConnectionMemo(jmri.jmrix.loconet.LocoNetSystemConnectionMemo) LnTrafficController(jmri.jmrix.loconet.LnTrafficController) Test(org.junit.Test)

Example 3 with LocoNetInterfaceScaffold

use of jmri.jmrix.loconet.LocoNetInterfaceScaffold in project JMRI by JMRI.

the class UhlenbrockLnThrottleManagerTest method testCTor.

@Test
public void testCTor() {
    LnTrafficController lnis = new LocoNetInterfaceScaffold();
    UhlenbrockSlotManager slotmanager = new UhlenbrockSlotManager(lnis);
    UhlenbrockSystemConnectionMemo memo = new UhlenbrockSystemConnectionMemo(lnis, slotmanager);
    UhlenbrockLnThrottleManager t = new UhlenbrockLnThrottleManager(memo);
    Assert.assertNotNull("exists", t);
}
Also used : UhlenbrockSlotManager(jmri.jmrix.loconet.UhlenbrockSlotManager) LocoNetInterfaceScaffold(jmri.jmrix.loconet.LocoNetInterfaceScaffold) LnTrafficController(jmri.jmrix.loconet.LnTrafficController) Test(org.junit.Test)

Example 4 with LocoNetInterfaceScaffold

use of jmri.jmrix.loconet.LocoNetInterfaceScaffold in project JMRI by JMRI.

the class LocoIOPanelTest method testSetAddr.

public void testSetAddr() {
    // prepare an interface
    LocoNetInterfaceScaffold lnis = new LocoNetInterfaceScaffold();
    // skip the warning dialog box
    LocoIOPanel f = new LocoIOPanel() {

        @Override
        protected int cautionAddrSet() {
            return 1;
        }
    };
    LocoNetSystemConnectionMemo memo = new LocoNetSystemConnectionMemo();
    memo.setLnTrafficController(lnis);
    f.initComponents(memo);
    f.addrField.setText("0134");
    // click button
    f.addrSetButton.doClick();
    // check first message of readAll
    Assert.assertEquals("One message sent", 1, lnis.outbound.size());
    LocoNetMessage msg = lnis.outbound.elementAt(0);
    Assert.assertEquals("message length", 16, msg.getNumDataElements());
    Assert.assertEquals("message opCode", 0xE5, msg.getOpCode());
    Assert.assertEquals("message bytes", "E5 10 50 00 01 00 01 01 00 34 10 00 00 00 00 00", msg.toString());
    // dispose and end operation
    f.dispose();
}
Also used : LocoNetMessage(jmri.jmrix.loconet.LocoNetMessage) LocoNetInterfaceScaffold(jmri.jmrix.loconet.LocoNetInterfaceScaffold) LocoNetSystemConnectionMemo(jmri.jmrix.loconet.LocoNetSystemConnectionMemo)

Example 5 with LocoNetInterfaceScaffold

use of jmri.jmrix.loconet.LocoNetInterfaceScaffold in project JMRI by JMRI.

the class LocoIOPanelTest method testFrameCreate.

public void testFrameCreate() {
    LocoNetInterfaceScaffold lnis = new LocoNetInterfaceScaffold();
    new LocoIOPanel();
    Assert.assertNotNull("exists", lnis);
}
Also used : LocoNetInterfaceScaffold(jmri.jmrix.loconet.LocoNetInterfaceScaffold)

Aggregations

LocoNetInterfaceScaffold (jmri.jmrix.loconet.LocoNetInterfaceScaffold)11 LocoNetSystemConnectionMemo (jmri.jmrix.loconet.LocoNetSystemConnectionMemo)6 LnTrafficController (jmri.jmrix.loconet.LnTrafficController)5 Test (org.junit.Test)5 SlotManager (jmri.jmrix.loconet.SlotManager)4 LocoNetMessage (jmri.jmrix.loconet.LocoNetMessage)3 UhlenbrockSlotManager (jmri.jmrix.loconet.UhlenbrockSlotManager)2 Before (org.junit.Before)2