1 19 20 package org.netbeans.modules.derby.spi.support; 21 22 import junit.framework.*; 23 import java.io.File ; 24 import java.io.FileInputStream ; 25 import java.io.FileNotFoundException ; 26 import java.io.IOException ; 27 import java.io.OutputStream ; 28 import java.util.zip.ZipEntry ; 29 import java.util.zip.ZipInputStream ; 30 import org.netbeans.api.db.explorer.ConnectionManager; 31 import org.netbeans.api.db.explorer.DatabaseConnection; 32 import org.netbeans.api.db.explorer.DatabaseException; 33 import org.netbeans.api.db.explorer.JDBCDriver; 34 import org.netbeans.api.db.explorer.JDBCDriverManager; 35 import org.netbeans.modules.derby.DerbyOptions; 36 import org.netbeans.modules.derby.RegisterDerby; 37 import org.openide.ErrorManager; 38 import org.openide.filesystems.FileLock; 39 import org.openide.filesystems.FileObject; 40 import org.openide.filesystems.FileUtil; 41 import org.openide.modules.InstalledFileLocator; 42 import org.openide.util.NbBundle; 43 44 48 public class DerbySupportTest extends TestCase { 49 50 public DerbySupportTest(String testName) { 51 super(testName); 52 } 53 54 public void testDefaultSystemHomeWhenNDSHPropertySetIssue76908() { 55 String defaultSystemHome = new File (System.getProperty("user.home"), ".netbeans-derby").getAbsolutePath(); 57 assertEquals(defaultSystemHome, DerbySupport.getDefaultSystemHome()); 58 59 System.setProperty(DerbyOptions.NETBEANS_DERBY_SYSTEM_HOME, "foo"); 61 assertEquals("foo", DerbySupport.getDefaultSystemHome()); 62 } 63 } 64 | Popular Tags |