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);
}
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));
}
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));
}
Aggregations