Search in sources :

Example 1 with DefaultProgrammerManager

use of jmri.managers.DefaultProgrammerManager in project JMRI by JMRI.

the class ProgServiceModePaneTest method testCreateHorizontalDIRECTBYTEMODE.

@Test
public void testCreateHorizontalDIRECTBYTEMODE() {
    Assume.assumeFalse(GraphicsEnvironment.isHeadless());
    // add dummy DCC
    InstanceManager.setProgrammerManager(new DefaultProgrammerManager((new ProgrammerScaffold(DefaultProgrammerManager.DIRECTBYTEMODE))));
    Assert.assertTrue("programer manager available", InstanceManager.getDefault(jmri.ProgrammerManager.class) != null);
    // create and show
    jmri.util.JmriJFrame f = new jmri.util.JmriJFrame("Horizontal DIRECTBYTEMODE");
    f.getContentPane().add(new ProgServiceModePane(BoxLayout.X_AXIS));
    f.pack();
    f.setLocation(0, 100);
    f.setVisible(true);
}
Also used : DefaultProgrammerManager(jmri.managers.DefaultProgrammerManager) ProgrammerScaffold(jmri.ProgrammerScaffold) Test(org.junit.Test)

Example 2 with DefaultProgrammerManager

use of jmri.managers.DefaultProgrammerManager in project JMRI by JMRI.

the class PackageTest method testConfigProgrammer.

// check configuring the programmer
public void testConfigProgrammer() {
    // initialize the system
    Programmer p = new ProgDebugger();
    InstanceManager.setProgrammerManager(new DefaultProgrammerManager(p));
    assertTrue(InstanceManager.getDefault(jmri.ProgrammerManager.class).getGlobalProgrammer() == p);
}
Also used : Programmer(jmri.Programmer) ProgDebugger(jmri.progdebugger.ProgDebugger) DefaultProgrammerManager(jmri.managers.DefaultProgrammerManager) DefaultProgrammerManager(jmri.managers.DefaultProgrammerManager)

Aggregations

DefaultProgrammerManager (jmri.managers.DefaultProgrammerManager)2 Programmer (jmri.Programmer)1 ProgrammerScaffold (jmri.ProgrammerScaffold)1 ProgDebugger (jmri.progdebugger.ProgDebugger)1 Test (org.junit.Test)1