]> granicus.if.org Git - postgresql/commitdiff
Added missing methods
authorDave Cramer <davec@fastcrypt.com>
Wed, 5 Nov 2003 11:57:53 +0000 (11:57 +0000)
committerDave Cramer <davec@fastcrypt.com>
Wed, 5 Nov 2003 11:57:53 +0000 (11:57 +0000)
src/interfaces/jdbc/org/postgresql/test/TestUtil.java

index 930215ed380595176e0c369de1443ae199a4954a..6b139435a54371fa3f0a1ef3fd6841ead5cfe700 100644 (file)
@@ -12,6 +12,30 @@ public class TestUtil
         * Returns the Test database JDBC URL
         */
        public static String getURL()
+       {
+               return "jdbc:postgresql://"+getServer()+":"+getPort()+"/"+getDatabase();
+       }
+
+       /*
+        * Returns the Test server
+        */
+       public static String getServer()
+       {
+               return System.getProperty("server");
+       }
+
+       /*
+        * Returns the Test port
+        */
+       public static int getPort()
+       {
+               return Integer.parseInt(System.getProperty("port"));
+       }
+
+       /*
+        * Returns the Test database
+        */
+       public static String getDatabase()
        {
                return System.getProperty("database");
        }