You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by my...@apache.org on 2008/01/15 22:02:55 UTC

svn commit: r612218 - in /db/derby/code/trunk/java: demo/toursdb/ testing/org/apache/derbyTesting/functionTests/harness/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/suites/ testing/org/apache/derb...

Author: myrnavl
Date: Tue Jan 15 13:02:48 2008
New Revision: 612218

URL: http://svn.apache.org/viewvc?rev=612218&view=rev
Log:
DERBY-3294 - convert test checkToursDB to junit CheckToursDBTest. 
   Patch contributed by Manjula Kutty.

Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/CheckToursDBTest.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/_Suite.java   (with props)
Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkToursDB.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/demo.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/demo.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/checkToursDB.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/checkToursDB_app.properties
Modified:
    db/derby/code/trunk/java/demo/toursdb/insertMaps.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/testtypes.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/AllPackages.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbyall.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/build.xml

Modified: db/derby/code/trunk/java/demo/toursdb/insertMaps.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/toursdb/insertMaps.java?rev=612218&r1=612217&r2=612218&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/toursdb/insertMaps.java (original)
+++ db/derby/code/trunk/java/demo/toursdb/insertMaps.java Tue Jan 15 13:02:48 2008
@@ -23,6 +23,8 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.io.InputStream;
 import java.sql.PreparedStatement;
 import java.sql.Connection;
@@ -49,42 +51,8 @@
 			connCS = DriverManager.getConnection(dbURLCS);
 			System.out.println("Successfully got the Derby database connection...");
 
-			PreparedStatement ps = null;
+			System.out.println("Inserted " + insertRows(null,connCS) + " rows into the ToursDB");
 
-			ps = connCS.prepareStatement
-			("insert into maps (map_name, region, area, photo_format, picture) values (?,?,?,?,?)");
-	
-			ps.setString(1,"BART");
-			ps.setString(2,"Bay Area");
-			ps.setBigDecimal(3, new BigDecimal("1776.11"));
-			ps.setString(4,"gif");
-			File file = new File ("BART.gif");
-			InputStream fileIn = new FileInputStream(file);
-			ps.setBinaryStream(5, fileIn, (int)file.length());
-			int numrows = ps.executeUpdate();
-
-			ps.setString(1,"Caltrain");
-			ps.setString(2,"West Bay");
-			ps.setBigDecimal(3, new BigDecimal("1166.77"));
-			ps.setString(4,"gif");
-			file = new File ("Caltrain.gif");
-			fileIn = new FileInputStream(file);
-			ps.setBinaryStream(5, fileIn, (int)file.length());
-			numrows = numrows + ps.executeUpdate();
-
-			ps.setString(1,"Light Rail");
-			ps.setString(2,"Santa Clara Valley");
-			ps.setBigDecimal(3, new BigDecimal("9117.90"));
-			ps.setString(4,"gif");
-			file = new File ("BART.gif");
-			fileIn = new FileInputStream(file);
-			ps.setBinaryStream(5, fileIn, (int)file.length());
-			numrows = numrows + ps.executeUpdate();
-
-			System.out.println("Inserted " + numrows + " rows into the ToursDB");
-
-			ps.close();
-	
 			connCS.close();
 
 		} catch (SQLException e) {
@@ -95,6 +63,64 @@
 			e.printStackTrace();
 		}
 
+	}
+	
+	public static int insertRows(String path, Connection conn) 
+	throws SQLException, FileNotFoundException, IOException {
+		PreparedStatement ps = null;
+
+		ps = conn.prepareStatement
+		("insert into maps (map_name, region, area, photo_format, picture) values (?,?,?,?,?)");
+
+		ps.setString(1,"BART");
+		ps.setString(2,"Bay Area");
+		ps.setBigDecimal(3, new BigDecimal("1776.11"));
+		ps.setString(4,"gif");
+		String fileName;
+		if (path == null)
+			fileName="BART.gif";
+		else
+			fileName=path + File.separator + "BART.gif";
+		File file = new File (fileName);
+		InputStream fileIn = new FileInputStream(file);
+		ps.setBinaryStream(5, fileIn, (int)file.length());
+		int numrows = ps.executeUpdate();
+		fileIn.close();
+
+		ps.setString(1,"Caltrain");
+		ps.setString(2,"West Bay");
+		ps.setBigDecimal(3, new BigDecimal("1166.77"));
+		ps.setString(4,"gif");
+		if (path == null)
+			fileName="Caltrain.gif";
+		else
+			fileName=path + File.separator + "Caltrain.gif";
+		file = new File (fileName);
+		fileIn = new FileInputStream(file);
+		ps.setBinaryStream(5, fileIn, (int)file.length());
+		numrows = numrows + ps.executeUpdate();
+		fileIn.close();
+
+		ps.setString(1,"Light Rail");
+		ps.setString(2,"Santa Clara Valley");
+		ps.setBigDecimal(3, new BigDecimal("9117.90"));
+		ps.setString(4,"gif");
+		// To insert LightRail.gif would give an error because that BLOB
+		// is larger than the size indicated for the column.
+		// But we don't want to make toursDB bigger in the distribution
+		if (path == null)
+			fileName="BART.gif";
+		else
+			fileName=path + File.separator + "BART.gif";
+		file = new File (fileName);
+		fileIn = new FileInputStream(file);
+		ps.setBinaryStream(5, fileIn, (int)file.length());
+		numrows = numrows + ps.executeUpdate();
+
+		fileIn.close();
+		ps.close();
+		
+		return numrows;
 	}
 
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java?rev=612218&r1=612217&r2=612218&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java Tue Jan 15 13:02:48 2008
@@ -497,7 +497,7 @@
                     suiteProperties.put("derbyTesting.jar.path", upgradejarpath);
 		String testout = sp.getProperty("testoutname");
 		if (testout != null)
-		    suiteProperties.put("testoutname", testout); // toursDemo
+		    suiteProperties.put("testoutname", testout);
 		String mtdir = sp.getProperty("mtestdir"); // used by multi tests
 		if (mtdir != null)
 		    suiteProperties.put("mtestdir", mtdir);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java?rev=612218&r1=612217&r2=612218&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java Tue Jan 15 13:02:48 2008
@@ -830,10 +830,7 @@
         // this is probably always going to be testBase
         if ( testOutName == null )
         {
-            if (testType.equals("demo"))
-                testOutName = testBase.substring(testBase.indexOf(".")+1);
-            else
-                testOutName = testBase;
+            testOutName = testBase;
         }
 
         // Create a .tmp file for doing sed later to create testBase.out
@@ -2263,7 +2260,7 @@
             jvm.setClasspath(classpath);
 
 		Vector jvmProps = new Vector();
-		if ( testType.equals("java") || testType.equals("demo") )
+		if ( testType.equals("java"))
 		    addStandardTestJvmProps(jvmProps,systemHome,
 			    outDir.getCanonicalPath(),null);		    
         else if ( (runDir != null) && (runDir.exists()) )

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/testtypes.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/testtypes.properties?rev=612218&r1=612217&r2=612218&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/testtypes.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/testtypes.properties Tue Jan 15 13:02:48 2008
@@ -1,4 +1,4 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+ to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
 # The ASF licenses this file to you under the Apache License, Version 2.0
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-testtypes=sql,sql2,unit,java,multi,demo,junit
+testtypes=sql,sql2,unit,java,multi,junit

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/AllPackages.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/AllPackages.java?rev=612218&r1=612217&r2=612218&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/AllPackages.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/AllPackages.java Tue Jan 15 13:02:48 2008
@@ -57,6 +57,7 @@
         suite.addTest(org.apache.derbyTesting.functionTests.tests.store._Suite.suite());
 	 suite.addTest(org.apache.derbyTesting.functionTests.tests.tools._Suite.suite());
         suite.addTest(org.apache.derbyTesting.functionTests.tests.engine._Suite.suite());
+        suite.addTest(org.apache.derbyTesting.functionTests.tests.demo._Suite.suite());
 
         // Suites that are compiled using Java SE 6 target need to
         // be added this way, otherwise creating the suite

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbyall.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbyall.properties?rev=612218&r1=612217&r2=612218&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbyall.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbyall.properties Tue Jan 15 13:02:48 2008
@@ -13,6 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-suites=derbylang derbynetmats storeall xa derbytools jdbc20 jdk14 jdbcapi derbynetclientmats encryptionAll demo multi unit i18nTest
+suites=derbylang derbynetmats storeall xa derbytools jdbc20 jdk14 jdbcapi derbynetclientmats encryptionAll multi unit i18nTest
 derby.debug.true=enableBtreeConsistencyCheck
 derby.stream.error.logSeverityLevel=0

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/CheckToursDBTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/CheckToursDBTest.java?rev=612218&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/CheckToursDBTest.java (added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/CheckToursDBTest.java Tue Jan 15 13:02:48 2008
@@ -0,0 +1,218 @@
+/*
+ *
+ * Derby - Class org.apache.derbyTesting.functionTests.tests.demo.CheckToursDBTest
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file ecept in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, 
+ * software distributed under the License is distributed on an 
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
+ * either express or implied. See the License for the specific 
+ * language governing permissions and limitations under the License.
+ */
+package org.apache.derbyTesting.functionTests.tests.demo;
+
+import java.sql.PreparedStatement;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.derbyTesting.junit.BaseJDBCTestCase;
+import org.apache.derbyTesting.junit.JDBC;
+import org.apache.derbyTesting.junit.TestConfiguration;
+import org.apache.derbyTesting.junit.SupportFilesSetup;
+
+import toursdb.insertMaps;
+
+/**
+ * This test is for testing the ToursDB database and functions
+ */
+public class CheckToursDBTest extends BaseJDBCTestCase {
+    /**
+     * Public constructor required for running test as standalone JUnit.
+     * @param name
+     */
+    public CheckToursDBTest(String name) {
+        super(name);
+    }
+
+   public static Test basesuite(String name) {
+        TestSuite suite = new TestSuite(CheckToursDBTest.class, name);
+        Test test = new SupportFilesSetup(suite, new String[] {
+                "functionTests/tests/demo/BART.gif",
+                "functionTests/tests/demo/Caltrain.gif" });
+        return test;
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite("CheckToursDBTest");
+        suite.addTest(basesuite("CheckToursDBTest:embedded"));
+        suite.addTest(TestConfiguration
+                .clientServerDecorator(basesuite("CheckToursDBTest:client")));
+        return suite;
+
+    }
+
+   /**
+    * Tear-down the fixture by removing the tables
+    * @throws Exception
+    */    protected void tearDown() throws Exception {
+        Statement st = createStatement();
+        st.execute("DROP TABLE AIRLINES");                
+        st.execute("DROP TABLE CITIES");
+        st.execute("DROP TABLE COUNTRIES");
+        st.execute("DROP TABLE FLIGHTAVAILABILITY");
+        st.execute("DROP TABLE FLIGHTS");
+        st.execute("DROP TABLE MAPS");
+        st.execute("DROP TABLE FLIGHTS_HISTORY");                      
+        st.close();
+        commit();
+        super.tearDown();
+    }
+
+    /**
+     * Test insert, update and delete on ToursDB tables 
+     * @throws Exception
+     */
+    public void testToursDB() throws Exception {
+        String[] dbfiles = { "ToursDB_schema.sql", "loadCOUNTRIES.sql",
+                "loadCITIES.sql", "loadAIRLINES.sql", "loadFLIGHTS1.sql",
+                "loadFLIGHTS2.sql", "loadFLIGHTAVAILABILITY1.sql",
+                "loadFLIGHTAVAILABILITY2.sql" };
+
+        for (int i = 0; i < dbfiles.length; i++) {
+            runScript("org/apache/derbyTesting/functionTests/tests/demo/"
+                    + dbfiles[i], "US-ASCII");
+        }
+        insertMapsPrivileged();
+        doSelect();
+        doUpdate();
+        doDelete();
+
+    }
+/**
+ * Method to delete rows from the ToursDB tables 
+ * @throws Exception
+ */
+    private void doDelete() throws Exception {
+        String tableName[] = { "AIRLINES", "CITIES", "COUNTRIES",
+                "FLIGHTAVAILABILITY", "FLIGHTS", "MAPS" };
+        int expectedRows[] = { 2, 87, 114, 518, 542, 3 };
+        PreparedStatement ps = null;
+        for (int i = 0; i < 6; i++) {
+            ps = prepareStatement("delete from " + tableName[i]);
+            assertEquals(ps.executeUpdate(), expectedRows[i]);
+        }
+
+        // now quickly checking FLIGHTS_HISTORY -
+        // should now have a 2nd row because of trigger2
+        ps = prepareStatement("select STATUS from FLIGHTS_HISTORY where FLIGHT_ID IS NULL and STATUS <> 'over'");
+        // don't care if there are more than 1 rows...
+        JDBC.assertSingleValueResultSet(ps.executeQuery(),
+                "INSERTED FROM TRIG2");
+        ps = prepareStatement("delete from FLIGHTS_HISTORY");
+        assertEquals(ps.executeUpdate(), 2);
+
+    }
+/**
+ * Method to update the rows in the ToursDB tables.
+ * @throws SQLException
+ */
+    private void doUpdate() throws SQLException {
+        PreparedStatement ps = null;
+        ps = prepareStatement("select ECONOMY_SEATS from AIRLINES where AIRLINE = 'AA'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(), "20");
+        Statement stmt = createStatement();
+        stmt.execute("update AIRLINES set ECONOMY_SEATS=108 where AIRLINE = 'AA'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(), "108");
+        ps = prepareStatement("select COUNTRY from COUNTRIES where COUNTRY_ISO_CODE = 'US'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(), "United States");
+        stmt.execute("update COUNTRIES set COUNTRY='United States of America' where COUNTRY_ISO_CODE = 'US'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(),
+                "United States of America");
+        ps = prepareStatement("select COUNTRY from CITIES where CITY_ID = 52");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(), "United States");
+        stmt.execute("update CITIES set COUNTRY='United States of America' where COUNTRY='United States'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(),
+                "United States of America");
+        ps = prepareStatement("select ECONOMY_SEATS_TAKEN from FLIGHTAVAILABILITY where FLIGHT_ID = 'AA1134' and FLIGHT_DATE='2004-03-31'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(), "2");
+        stmt.execute("update FLIGHTAVAILABILITY set ECONOMY_SEATS_TAKEN=20 where FLIGHT_ID = 'AA1134' and FLIGHT_DATE='2004-03-31'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(), "20");
+        ps = prepareStatement("select AIRCRAFT from FLIGHTS where FLIGHT_ID = 'AA1183'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(), "B747");
+        stmt.execute("update FLIGHTS set AIRCRAFT='B777' where FLIGHT_ID = 'AA1134'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(), "B747");
+        ps = prepareStatement("select REGION from MAPS where MAP_NAME = 'BART'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(), "Bay Area");
+        stmt.execute("update MAPS set REGION='San Francisco Bay Area' where MAP_NAME = 'BART'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(),
+                "San Francisco Bay Area");
+        // Flight_history is now has 1 row, because of TRIG1
+        ps = prepareStatement("select STATUS from FLIGHTS_HISTORY where FLIGHT_ID = 'AA1134'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(),
+                "INSERTED FROM TRIG1");
+        stmt.execute("update FLIGHTS_HISTORY set STATUS='over' where FLIGHT_ID='AA1134'");
+        JDBC.assertSingleValueResultSet(ps.executeQuery(), "over");
+
+    }
+/**
+ * Inserts rows in the Maps table. Calls insertMaps().
+ * @throws Exception
+ */
+    public void insertMapsPrivileged() throws Exception {
+        try {
+
+            AccessController.doPrivileged(new PrivilegedExceptionAction() {
+                public Object run() throws SQLException, FileNotFoundException,
+                        IOException {
+                    insertMaps();
+                    return null;
+                }
+            });
+        } catch (PrivilegedActionException e) {
+            throw e.getException();
+        }
+    }
+/**
+ * Method to select rows from ToursDB tables
+ * @throws SQLException
+ */
+    private void doSelect() throws SQLException {
+        String expectedRows[] = { "2", "114", "87", "518", "542", "3", "0" };
+        // now ensure we can select from all the tables
+        PreparedStatement ps = null;
+        String tableName[] = { "AIRLINES", "COUNTRIES", "CITIES",
+                "FLIGHTAVAILABILITY", "FLIGHTS", "MAPS", "FLIGHTS_HISTORY" };
+        for (int i = 0; i < 7; i++) {
+            ps = prepareStatement("select count(*) from " + tableName[i]);
+            JDBC.assertSingleValueResultSet(ps.executeQuery(), expectedRows[i]);
+           }
+       
+    }
+/**
+ * Inserts 3 rows in the Maps table. 
+ * @throws SQLException
+ * @throws FileNotFoundException
+ * @throws IOException
+ */
+    private void insertMaps() 
+    throws SQLException, FileNotFoundException, IOException {
+        Connection conn = getConnection();
+        assertEquals(insertMaps.insertRows("extin", conn), 3);
+    }
+
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/CheckToursDBTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/_Suite.java?rev=612218&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/_Suite.java (added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/_Suite.java Tue Jan 15 13:02:48 2008
@@ -0,0 +1,51 @@
+/*
+
+   Derby - Class org.apache.derbyTesting.functionTests.tests.demo._Suite
+
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License
+*/
+package org.apache.derbyTesting.functionTests.tests.demo;
+
+import org.apache.derbyTesting.junit.BaseTestCase;
+import junit.framework.Test; 
+import junit.framework.TestSuite;
+
+/**
+ * Suite to run all JUnit tests in this package:
+ * org.apache.derbyTesting.functionTests.tests.demo
+ *
+ */
+
+public class _Suite extends BaseTestCase  {
+
+    /**
+     * Use suite method instead.
+     */
+    private _Suite(String name) {
+        super(name);
+    }
+    
+    public static Test suite() {
+
+        TestSuite suite = new TestSuite("demo");
+        suite.addTest(CheckToursDBTest.suite());
+        
+        return suite;
+    }
+    
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/_Suite.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/build.xml?rev=612218&r1=612217&r2=612218&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/demo/build.xml Tue Jan 15 13:02:48 2008
@@ -82,6 +82,7 @@
       <classpath>
         <!--pathelement location="${oro}"/-->
         <pathelement path="${compile.classpath}"/>
+        <pathelement path="${junit}"/>
       </classpath>
       <include name="${this.dir}/*.java"/>
       <!--exclude name=""/-->