Package com.socrata.datasync.config.userpreferences

Examples of com.socrata.datasync.config.userpreferences.UserPreferencesJava.clear()


    }

    public JobStatus run() {
        UserPreferencesJava newUserPrefs = new UserPreferencesJava();
        try {
            newUserPrefs.clear();
        } catch (BackingStoreException e) {
            System.err.println("Was unable to clear old preferences before loading new ones.");
        }

        newUserPrefs.saveDomain(userPrefs.getDomain());
View Full Code Here


    }

    @Test
    public void testLoadCompletePreferencesWithClearStart() throws ParseException, BackingStoreException {
        UserPreferencesJava userPrefs = new UserPreferencesJava();
        userPrefs.clear();

        String[] args = {"-t", "LoadPreferences", "-c", "src/test/resources/basic_test_config.json"};
        Main.main(args);
        TestCase.assertEquals("https://sandbox.demo.socrata.com", userPrefs.getDomain());
        TestCase.assertEquals("testuser@gmail.com", userPrefs.getUsername());
View Full Code Here

    }

    @Test
    public void testLoadIncompletePreferencesWithClearStart() throws ParseException, BackingStoreException {
        UserPreferencesJava userPrefs = new UserPreferencesJava();
        userPrefs.clear();

        String[] args = {"-t", "LoadPreferences", "-c", "src/test/resources/simple_config.json"};
        Main.main(args);
        TestCase.assertEquals("https://someDomain.com", userPrefs.getDomain());
        TestCase.assertEquals("some.user@gmail.com", userPrefs.getUsername());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.