Search in sources :

Example 1 with AuxiliaryConfiguration

use of jmri.profile.AuxiliaryConfiguration in project JMRI by JMRI.

the class JmriConfigurationProviderTest method testGetConfigurationFragment.

public void testGetConfigurationFragment() throws IOException {
    String id = Long.toString((new Date()).getTime());
    String elementName = "test:testElement";
    String namespace = "test";
    Profile project = new Profile(this.getName(), id, new File(this.workspace.toFile(), id));
    AuxiliaryConfiguration config = JmriConfigurationProvider.getConfiguration(project);
    Element e = config.getConfigurationFragment(elementName, namespace, true);
    assertNull(e);
    e = document.createElementNS(namespace, elementName);
    config.putConfigurationFragment(e, true);
    FileUtil.delete(project.getPath());
}
Also used : AuxiliaryConfiguration(jmri.profile.AuxiliaryConfiguration) Element(org.w3c.dom.Element) File(java.io.File) Date(java.util.Date) Profile(jmri.profile.Profile)

Example 2 with AuxiliaryConfiguration

use of jmri.profile.AuxiliaryConfiguration in project JMRI by JMRI.

the class JmriConfigurationProviderTest method testGetConfiguration.

/**
     * Test of getConfiguration method, of class JmriConfigurationProvider.
     *
     * @throws java.io.IOException
     */
public void testGetConfiguration() throws IOException {
    String id = Long.toString((new Date()).getTime());
    Profile project = new Profile(this.getName(), id, new File(this.workspace.toFile(), id));
    AuxiliaryConfiguration config = JmriConfigurationProvider.getConfiguration(project);
    assertNotNull(config);
    FileUtil.delete(project.getPath());
}
Also used : AuxiliaryConfiguration(jmri.profile.AuxiliaryConfiguration) File(java.io.File) Date(java.util.Date) Profile(jmri.profile.Profile)

Aggregations

File (java.io.File)2 Date (java.util.Date)2 AuxiliaryConfiguration (jmri.profile.AuxiliaryConfiguration)2 Profile (jmri.profile.Profile)2 Element (org.w3c.dom.Element)1