1 19 20 package org.netbeans.core.startup.preferences; 21 22 import java.util.prefs.Preferences ; 23 import org.netbeans.junit.NbTestCase; 24 25 29 public class PreferencesProviderImplTest extends NbPreferencesTest.TestBasicSetup { 30 public PreferencesProviderImplTest(String testName) { 31 super(testName); 32 } 33 34 37 public void testPreferencesForModule() { 38 PreferencesProviderImpl instance = new PreferencesProviderImpl(); 39 Preferences result = instance.preferencesForModule(getClass()); 40 assertNotNull(result); 41 assertTrue(NbPreferences.class.isAssignableFrom(result.getClass())); 42 assertEquals(result.absolutePath(),"/"+getClass().getPackage().getName().replace('.','/')); 43 } 44 45 48 public void testPreferencesRoot() { 49 PreferencesProviderImpl instance = new PreferencesProviderImpl(); 50 Preferences result = instance.preferencesRoot(); 51 assertNotNull(result); 52 assertTrue(NbPreferences.class.isAssignableFrom(result.getClass())); 53 assertEquals(result.absolutePath(),"/"); 54 } 55 56 } 57 | Popular Tags |