Search in sources :

Example 1 with ConfigXmlManager

use of jmri.configurexml.ConfigXmlManager in project JMRI by JMRI.

the class RpsPositionIconTest method testCtorAndID.

@Test
public void testCtorAndID() throws Exception {
    Assume.assumeFalse(GraphicsEnvironment.isHeadless());
    // init test system
    new Engine() {

        void reset() {
            _instance = null;
        }
    }.reset();
    new ConfigXmlManager().load(new File("java/test/jmri/jmrix/rps/LocationTestPanel.xml"));
    // and push a good measurement
    Reading loco = new Reading("27", null);
    Measurement m = new Measurement(loco, 0.0, 0.0, 0.0, 0.133, 5, "source");
    Distributor.instance().submitMeasurement(m);
    JFrame f = JmriJFrame.getFrame("RPS Location Test");
    Assert.assertNotNull("found frame", f);
    f.dispose();
}
Also used : JmriJFrame(jmri.util.JmriJFrame) JFrame(javax.swing.JFrame) ConfigXmlManager(jmri.configurexml.ConfigXmlManager) File(java.io.File) Test(org.junit.Test)

Aggregations

File (java.io.File)1 JFrame (javax.swing.JFrame)1 ConfigXmlManager (jmri.configurexml.ConfigXmlManager)1 JmriJFrame (jmri.util.JmriJFrame)1 Test (org.junit.Test)1