Search in sources :

Example 61 with Programmer

use of jmri.Programmer in project JMRI by JMRI.

the class DebugProgrammerManagerTest method testOpsModeUnique.

/**
     * Any identical ops mode request gets the same object
     */
public void testOpsModeUnique() {
    InstanceManager.setProgrammerManager(new DebugProgrammerManager());
    Programmer p = InstanceManager.getDefault(jmri.ProgrammerManager.class).getAddressedProgrammer(true, 777);
    Assert.assertTrue("same ops mode programmer", InstanceManager.getDefault(jmri.ProgrammerManager.class).getAddressedProgrammer(true, 777) == p);
}
Also used : Programmer(jmri.Programmer)

Example 62 with Programmer

use of jmri.Programmer in project JMRI by JMRI.

the class DebugProgrammerManagerTest method testOpsModeRequest.

/**
     * ops mode request returns a programmer
     */
public void testOpsModeRequest() {
    InstanceManager.setProgrammerManager(new DebugProgrammerManager());
    Programmer p = InstanceManager.getDefault(jmri.ProgrammerManager.class).getAddressedProgrammer(true, 777);
    Assert.assertTrue("got ops mode", p != null);
    Assert.assertTrue("correct type", (p instanceof ProgDebugger));
}
Also used : Programmer(jmri.Programmer)

Example 63 with Programmer

use of jmri.Programmer in project JMRI by JMRI.

the class DebugProgrammerManagerTest method testServiceModeRequest.

/**
     * Service mode request returns a programmer
     */
public void testServiceModeRequest() {
    InstanceManager.setProgrammerManager(new DebugProgrammerManager());
    Programmer p = InstanceManager.getDefault(jmri.ProgrammerManager.class).getGlobalProgrammer();
    Assert.assertTrue("got service mode", p != null);
    Assert.assertTrue("correct type", (p instanceof ProgDebugger));
}
Also used : Programmer(jmri.Programmer)

Aggregations

Programmer (jmri.Programmer)63 ProgDebugger (jmri.progdebugger.ProgDebugger)33 ProgListener (jmri.ProgListener)27 JFrame (javax.swing.JFrame)4 JPanel (javax.swing.JPanel)3 ProgrammerException (jmri.ProgrammerException)3 IdentifyLoco (jmri.jmrit.roster.IdentifyLoco)3 PaneOpsProgFrame (jmri.jmrit.symbolicprog.tabbedframe.PaneOpsProgFrame)3 BoxLayout (javax.swing.BoxLayout)2 JLabel (javax.swing.JLabel)2 JMenuBar (javax.swing.JMenuBar)2 AddressedProgrammerManager (jmri.AddressedProgrammerManager)2 GlobalProgrammerManager (jmri.GlobalProgrammerManager)2 DecoderFile (jmri.jmrit.decoderdefn.DecoderFile)2 IdentifyDecoder (jmri.jmrit.decoderdefn.IdentifyDecoder)2 ProgModeSelector (jmri.jmrit.progsupport.ProgModeSelector)2 RosterEntry (jmri.jmrit.roster.RosterEntry)2 CvTableModel (jmri.jmrit.symbolicprog.CvTableModel)2 IndexedCvTableModel (jmri.jmrit.symbolicprog.IndexedCvTableModel)2 KnownLocoSelPane (jmri.jmrit.symbolicprog.KnownLocoSelPane)2