Package net.kd8rho.util

Examples of net.kd8rho.util.SJFIO


        super.setUp();

        theTestPreferences=new Preferences();
        theTestPreferences.setSettingFileLocation(FILE_NAME);

        SJFIO thePrefFile=new SJFIO(FILE_NAME);
        thePrefFile.theFileInMem.add("test_preferences: test1");
        thePrefFile.theFileInMem.add("test_preferences_2: test2");
        thePrefFile.theFileInMem.add("#this is a comment");
        thePrefFile.write();
    }
View Full Code Here


    public void testexecutedSaveToFile() throws Exception {
        System.out.println("Save to file");
        theTestPreferences.loadFromFile(FILE_NAME);
        theTestPreferences.setPreference("test_preferences_3","test3");//Set a third one to test...
        theTestPreferences.saveToFile();
        SJFIO thePrefFile=new SJFIO(FILE_NAME);
        thePrefFile.read();
        assertEquals(thePrefFile.theFileInMem.get(0), "test_preferences: test1");
        assertEquals(thePrefFile.theFileInMem.get(1),"test_preferences_2: test2");
        assertEquals(thePrefFile.theFileInMem.get(2),"#this is a comment");
        assertEquals(thePrefFile.theFileInMem.get(3),"test_preferences_3: test3");
    }
View Full Code Here

TOP

Related Classes of net.kd8rho.util.SJFIO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.