Search in sources :

Example 91 with DccLocoAddress

use of jmri.DccLocoAddress in project JMRI by JMRI.

the class NmraConsistTest method testCtor.

@Test
public void testCtor() {
    // NmraLocoAddress constructor test.
    NmraConsist c = new NmraConsist(new DccLocoAddress(12, true));
    Assert.assertNotNull(c);
}
Also used : DccLocoAddress(jmri.DccLocoAddress) Test(org.junit.Test)

Example 92 with DccLocoAddress

use of jmri.DccLocoAddress in project JMRI by JMRI.

the class DccLocoAddressSelectorTest method testSetNumByField2.

public void testSetNumByField2() {
    setThrottleManager();
    DccLocoAddressSelector sel = new DccLocoAddressSelector();
    JTextField f = sel.getTextField();
    f.setText("1220");
    Assert.assertEquals("check initial number ", 1220, sel.getAddress().getNumber());
    sel.setAddress(new DccLocoAddress(20, false));
    Assert.assertEquals("check updated number ", 20, sel.getAddress().getNumber());
    Assert.assertEquals("check updated type ", false, sel.getAddress().isLongAddress());
}
Also used : JTextField(javax.swing.JTextField) DccLocoAddress(jmri.DccLocoAddress)

Example 93 with DccLocoAddress

use of jmri.DccLocoAddress in project JMRI by JMRI.

the class CbusThrottleTest method testCTor.

@Test
public void testCTor() {
    TrafficControllerScaffold tc = new TrafficControllerScaffold();
    CanSystemConnectionMemo memo = new CanSystemConnectionMemo();
    memo.setTrafficController(tc);
    CbusThrottle t = new CbusThrottle(memo, new DccLocoAddress(100, true), 100);
    Assert.assertNotNull("exists", t);
}
Also used : CanSystemConnectionMemo(jmri.jmrix.can.CanSystemConnectionMemo) TrafficControllerScaffold(jmri.jmrix.can.TrafficControllerScaffold) DccLocoAddress(jmri.DccLocoAddress) Test(org.junit.Test)

Example 94 with DccLocoAddress

use of jmri.DccLocoAddress in project JMRI by JMRI.

the class EasyDccConsistTest method testCtor2.

@Test
public void testCtor2() {
    // NmraLocoAddress constructor test.
    EasyDccConsist c = new EasyDccConsist(new DccLocoAddress(12, true));
    Assert.assertNotNull(c);
}
Also used : DccLocoAddress(jmri.DccLocoAddress) Test(org.junit.Test)

Example 95 with DccLocoAddress

use of jmri.DccLocoAddress in project JMRI by JMRI.

the class LocoNetConsistTest method testCtor2.

@Test
public void testCtor2() {
    // DccLocoAddress constructor test.
    LocoNetConsist c = new LocoNetConsist(new DccLocoAddress(3, false), memo);
    ReturnSlotInfo();
    Assert.assertNotNull(c);
}
Also used : DccLocoAddress(jmri.DccLocoAddress) Test(org.junit.Test)

Aggregations

DccLocoAddress (jmri.DccLocoAddress)96 Consist (jmri.Consist)12 ThrottleManager (jmri.ThrottleManager)7 IOException (java.io.IOException)6 Element (org.jdom2.Element)6 Test (org.junit.Test)6 Matcher (java.util.regex.Matcher)5 DccThrottle (jmri.DccThrottle)5 SystemConnectionMemo (jmri.jmrix.SystemConnectionMemo)5 JsonException (jmri.server.json.JsonException)5 Pattern (java.util.regex.Pattern)4 IdTag (jmri.IdTag)3 JsonNode (com.fasterxml.jackson.databind.JsonNode)2 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)2 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)2 ArrayList (java.util.ArrayList)2 Locale (java.util.Locale)2 JTextField (javax.swing.JTextField)2 CommandStation (jmri.CommandStation)2 ProgrammerException (jmri.ProgrammerException)2