Package java.util.prefs

Examples of java.util.prefs.PreferencesFactory


   
  }

  @Test(dataProvider="dpReadAndWrite", expectedExceptions = {IllegalStateException.class})
  public void testPreferencesAddAndRemoveNode(boolean isSystemRoot, PreferencesFactory factory) throws BackingStoreException {
    PreferencesFactory savedFactory = MultiPreferencesFactory.getFactory();
   
    try {
      MultiPreferencesFactory.setFactory(factory);
      String nodeName = "this/is/a/test/testPreferencesAddAndRemoveNode";
     
View Full Code Here


    }
  }

  @Test(dataProvider = "dpReadAndWrite")
  public void testPreferencesAddAndRemoveValue(boolean isSystemRoot, PreferencesFactory factory) throws BackingStoreException {
    PreferencesFactory savedFactory = MultiPreferencesFactory.getFactory();
   
    try {
      MultiPreferencesFactory.setFactory(factory);
      String nodeName = "this/is/a/test/testPreferencesAddAndRemoveValue";
     
View Full Code Here

    }
  }
 
  @Test(dataProvider = "dpReadAndWrite")
  public void testListKeys(boolean isSystemRoot, PreferencesFactory factory) throws BackingStoreException {
    PreferencesFactory savedFactory = MultiPreferencesFactory.getFactory();
   
    try {
      MultiPreferencesFactory.setFactory(factory);
      String nodeName = "this/is/a/test/testListKeys";
     
View Full Code Here

    }
  }

  @Test(dataProvider = "dpReadAndWrite")
  public void testListNodes(boolean isSystemRoot, PreferencesFactory factory) throws BackingStoreException {
    PreferencesFactory savedFactory = MultiPreferencesFactory.getFactory();
   
    try {
      MultiPreferencesFactory.setFactory(factory);
      String rootNodeName = String.format("this/is/a/test/%s", UUID.randomUUID().toString());
      String nodeName = rootNodeName + "/testListKeys";
View Full Code Here

  }

  // FilePreferencesFactory
  @Test
  public void testLoadFiles() throws URISyntaxException {
    PreferencesFactory savedFactory = MultiPreferencesFactory.getFactory();
   
    try {
      MultiPreferencesFactory.setFactory(new FilePreferencesFactory());

      Preferences pref = Preferences.systemRoot().node("com/netfever/preferences");
View Full Code Here

import com.netfever.preferences.MultiPreferencesFactory;

public class TestMultiPreferencesFactory {
  @Test
  public void testFactoryGetSet() {
    PreferencesFactory factory = new MemoryPreferencesFactory();
   
    MultiPreferencesFactory.setFactory(factory);
   
    PreferencesFactory factory2 = MultiPreferencesFactory.getFactory();
   
    assert factory == factory2 : "Factory mismatch between getter and setter";
  }
View Full Code Here

TOP

Related Classes of java.util.prefs.PreferencesFactory

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.