Package com.opera.core.systems.preferences

Examples of com.opera.core.systems.preferences.OperaGenericPreferences


  @Test
  public void testMerge() {
    int prefCountBefore = preferences.size();

    OperaPreferences newPrefs = new OperaGenericPreferences();
    newPrefs.set("Developer Tools", "Proxy Host", "1.2.3.4");
    newPrefs.set("Developer Tools", "Proxy Port", 1234);
    newPrefs.set("Developer Tools", "Proxy Auto Connect", true);

    preferences.merge(newPrefs);

    assertEquals("1.2.3.4", preferences.get("Developer Tools", "Proxy Host").getValue());
    assertEquals(1234, preferences.get("Developer Tools", "Proxy Port").getValue());
View Full Code Here


    assertEquals("BAZ", preferences.get("Developer Tools", "Proxy Host").getValue());
  }

  @Test
  public void testMerge() {
    OperaPreferences newPrefs = new OperaGenericPreferences();
    newPrefs.set("Developer Tools", "Proxy Host", "1.2.3.4");
    newPrefs.set("Developer Tools", "Proxy Port", 1234);
    newPrefs.set("Developer Tools", "Proxy Auto Connect", true);

    preferences.merge(newPrefs);

    assertEquals("1.2.3.4", preferences.get("Developer Tools", "Proxy Host").getValue());
    assertEquals(1234, preferences.get("Developer Tools", "Proxy Port").getValue());
View Full Code Here

    new OperaFilePreferences(new File("/path/does/not/exist"));
  }

  @Test
  public void testMerge() {
    OperaPreferences newPrefs = new OperaGenericPreferences();
    newPrefs.set("Developer Tools", "Proxy Host", "1.2.3.4");
    newPrefs.set("Developer Tools", "Proxy Port", 1234);
    newPrefs.set("Developer Tools", "Proxy Auto Connect", true);

    preferences.merge(newPrefs);

    assertEquals("1.2.3.4", preferences.get("Developer Tools", "Proxy Host").getValue());
    assertEquals(1234, preferences.get("Developer Tools", "Proxy Port").getValue());
View Full Code Here

  // If we have an existing OperaGenericPreferences object this will not write the preferences to
  // disk, so in this test we will check whether OperaProfile.setPreferences() does that for us.
  @Test
  public void testPreferencesAreSetWithGenericPreferenceObject() {
    OperaPreferences preferences = new OperaGenericPreferences();
    profile.preferences().set("Personal Info", "Country", "Norway");
    profile.setPreferences(preferences);

    OperaSettings settings = new OperaSettings(profile);
    driver = new TestDriverBuilder().using(settings).get();
View Full Code Here

TOP

Related Classes of com.opera.core.systems.preferences.OperaGenericPreferences

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.