Search in sources :

Example 1 with SettingsContainer

use of de.unijena.cheminf.mortar.model.settings.SettingsContainer in project MORTAR by FelixBaensch.

the class PreferenceContainerTest method testPropertyToPreferenceConversion.

@Test
public void testPropertyToPreferenceConversion() throws Exception {
    Locale.setDefault(new Locale("en", "GB"));
    SugarRemovalUtilityFragmenter tmpSRUFragmenter = new SugarRemovalUtilityFragmenter();
    String tmpDir = FileUtil.getAppDirPath() + File.separatorChar + "Test" + File.separatorChar;
    (new File(tmpDir)).mkdirs();
    String tmpFilePathname = tmpDir + "SRUFragmenterSettings.txt";
    PreferenceContainer tmpContainer = PreferenceUtil.translateJavaFxPropertiesToPreferences(tmpSRUFragmenter.settingsProperties(), tmpFilePathname);
    tmpContainer.writeRepresentation();
    tmpContainer = PreferenceUtil.translateJavaFxPropertiesToPreferences(new ErtlFunctionalGroupsFinderFragmenter().settingsProperties(), tmpDir + "EFGFFragmenterSettings.txt");
    tmpContainer.writeRepresentation();
    tmpContainer = PreferenceUtil.translateJavaFxPropertiesToPreferences(new SettingsContainer().settingsProperties(), tmpDir + "SettingContainer.txt");
    tmpContainer.writeRepresentation();
}
Also used : Locale(java.util.Locale) ErtlFunctionalGroupsFinderFragmenter(de.unijena.cheminf.mortar.model.fragmentation.algorithm.ErtlFunctionalGroupsFinderFragmenter) SugarRemovalUtilityFragmenter(de.unijena.cheminf.mortar.model.fragmentation.algorithm.SugarRemovalUtilityFragmenter) SettingsContainer(de.unijena.cheminf.mortar.model.settings.SettingsContainer) File(java.io.File) Test(org.junit.Test)

Aggregations

ErtlFunctionalGroupsFinderFragmenter (de.unijena.cheminf.mortar.model.fragmentation.algorithm.ErtlFunctionalGroupsFinderFragmenter)1 SugarRemovalUtilityFragmenter (de.unijena.cheminf.mortar.model.fragmentation.algorithm.SugarRemovalUtilityFragmenter)1 SettingsContainer (de.unijena.cheminf.mortar.model.settings.SettingsContainer)1 File (java.io.File)1 Locale (java.util.Locale)1 Test (org.junit.Test)1