harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r386087 [42/45] - in /incubator/harmony/enhanced/classlib/trunk: make/ make/patternsets/ modules/jndi/ modules/jndi/META-INF/ modules/jndi/make/ modules/jndi/make/common/ modules/jndi/src/ modules/jndi/src/main/ modules/jndi/src/main/java/ ...
Date Wed, 15 Mar 2006 14:57:17 GMT
Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/DriverManagerTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/DriverManagerTest.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/DriverManagerTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/DriverManagerTest.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,667 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.lang.reflect.Method;
+import java.security.Permission;
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.sql.SQLPermission;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+/**
+ * JUnit Testcase for the java.sql.DriverManager class
+ * 
+ */
+public class DriverManagerTest extends TestCase {
+
+	// Set of driver names to use
+	static final String DRIVER1 = "tests.api.java.sql.TestHelper_Driver1";
+
+	static final String DRIVER2 = "tests.api.java.sql.TestHelper_Driver2";
+
+	static final String DRIVER3 = "tests.api.java.sql.TestHelper_Driver3";
+
+	static final String DRIVER4 = "tests.api.java.sql.TestHelper_Driver4";
+
+	static final String DRIVER5 = "tests.api.java.sql.TestHelper_Driver5";
+
+	static final String INVALIDDRIVER1 = "abc.klm.Foo";
+
+	static String[] driverNames = { DRIVER1, DRIVER2 };
+
+	static int numberLoaded;
+
+	static String baseURL1 = "jdbc:mikes1";
+
+	static String baseURL4 = "jdbc:mikes4";
+
+	static final String JDBC_PROPERTY = "jdbc.drivers";
+
+	static TestHelper_ClassLoader testClassLoader = new TestHelper_ClassLoader();
+
+	// Static initializer to load the drivers so that they are available to all
+	// the
+	// test methods as needed.
+	public void setUp() {
+		numberLoaded = loadDrivers();
+	} // end setUp()
+
+	/**
+	 * Test for the method DriverManager.deregisterDriver
+	 */
+	public void testDeregisterDriver() {
+		// First get one of the drivers loaded by the test
+		Driver aDriver;
+		try {
+			aDriver = DriverManager.getDriver(baseURL4);
+		} catch (SQLException e) {
+			fail(
+					"testDeregisterDriver: Got exception when getting valid driver.");
+			return;
+		} // end try
+
+		// printClassLoader( aDriver );
+
+		// Deregister this driver
+		try {
+			DriverManager.deregisterDriver(aDriver);
+		} catch (Exception e) {
+			fail(
+					"testDeregisterDriver: Got exception when deregistering valid driver.");
+		} // end try
+
+		assertFalse("testDeregisterDriver: Driver was not deregistered.",
+				isDriverLoaded(aDriver));
+
+		// Re-register this driver (so subsequent tests have it available)
+		try {
+			DriverManager.registerDriver(aDriver);
+		} catch (Exception e) {
+			fail(
+					"testDeregisterDriver: Got exception when reregistering valid driver.");
+		} // end try
+
+		assertTrue("testDeregisterDriver: Driver did not reload.",
+				isDriverLoaded(aDriver));
+
+		// Test deregistering a null driver
+		try {
+			DriverManager.deregisterDriver(null);
+		} catch (SQLException e) {
+			fail(
+					"testDeregisterDriver: Got exception when deregistering null driver.");
+		} // end try
+
+		// Test deregistering a driver which was not loaded by this test's
+		// classloader
+		// TODO - need to load a driver with a different classloader!!
+		try {
+			aDriver = DriverManager.getDriver(baseURL1);
+		} catch (SQLException e) {
+			fail(
+					"testDeregisterDriver: Got exception when getting valid driver1.");
+			return;
+		} // end try
+
+		TestHelper_DriverManager testHelper;
+		try {
+			Class driverClass = Class.forName(
+					"tests.api.java.sql.TestHelper_DriverManager", true,
+					testClassLoader);
+
+			// Give the Helper class one of our drivers....
+			Class[] methodClasses = { Class.forName("java.sql.Driver") };
+			Method theMethod = driverClass.getDeclaredMethod("setDriver",
+					methodClasses);
+			Object[] args = { aDriver };
+			theMethod.invoke(null, args);
+		} catch (Exception e) {
+			System.out
+					.println("testDeregisterDriver: Got exception allocating TestHelper");
+			e.printStackTrace();
+			return;
+		} // end try
+
+		// Check that the driver was not deregistered
+		assertTrue(
+				"testDeregisterDriver: Driver was incorrectly deregistered.",
+				DriverManagerTest.isDriverLoaded(aDriver));
+
+	} // end method testDeregisterDriver()
+
+	static void printClassLoader(Object theObject) {
+		Class theClass = theObject.getClass();
+		ClassLoader theClassLoader = theClass.getClassLoader();
+		System.out.println("ClassLoader is: " + theClassLoader.toString()
+				+ " for object: " + theObject.toString());
+	} // end method printClassLoader( Object )
+
+	static boolean isDriverLoaded(Driver theDriver) {
+		Enumeration driverList = DriverManager.getDrivers();
+		while (driverList.hasMoreElements()) {
+			if ((Driver) driverList.nextElement() == theDriver)
+				return true;
+		} // end while
+		return false;
+	} // end method isDriverLoaded( Driver )
+
+	/*
+	 * Class under test for Connection getConnection(String)
+	 */
+	// valid connection - data1 does not require a user and password...
+	static String validConnectionURL = "jdbc:mikes1:data1";
+
+	// invalid connection - data2 requires a user & password
+	static String invalidConnectionURL1 = "jdbc:mikes1:data2";
+
+	// invalid connection - URL is gibberish
+	static String invalidConnectionURL2 = "xyz1:abc3:456q";
+
+	// invalid connection - URL is null
+	static String invalidConnectionURL3 = null;
+
+	static String[] invalidConnectionURLs = { invalidConnectionURL1,
+			invalidConnectionURL2, invalidConnectionURL3 };
+
+	static String[] exceptionMessages = {
+			"Userid and/or password not supplied", "No suitable driver",
+			"The url cannot be null" };
+
+	public void testGetConnectionString() {
+		Connection theConnection = null;
+		// validConnection - no user & password required
+		try {
+			theConnection = DriverManager.getConnection(validConnectionURL);
+			assertTrue(theConnection != null);
+		} catch (SQLException e) {
+			assertTrue(false);
+		} // end try
+
+		// invalid connections
+		for (int i = 0; i < invalidConnectionURLs.length; i++) {
+			theConnection = null;
+			try {
+				theConnection = DriverManager
+						.getConnection(invalidConnectionURLs[i]);
+				assertFalse(theConnection != null);
+			} catch (SQLException e) {
+				assertTrue(theConnection == null);
+				// System.out.println("testGetConnectionString: exception
+				// message: " +
+				// e.getMessage() );
+				assertTrue(e.getMessage().equals(exceptionMessages[i]));
+			} // end try
+		} // end for
+	} // end method testGetConnectionString()
+
+	/*
+	 * Class under test for Connection getConnection(String, Properties)
+	 */
+	public void testGetConnectionStringProperties() {
+		String validURL1 = "jdbc:mikes1:data2";
+		String validuser1 = "theuser";
+		String validpassword1 = "thepassword";
+		String invalidURL1 = "xyz:abc1:foo";
+		String invalidURL2 = "jdbc:mikes1:crazyone";
+		String invalidURL3 = "";
+		String invaliduser1 = "jonny nouser";
+		String invalidpassword1 = "whizz";
+		Properties nullProps = null;
+		Properties validProps = new Properties();
+		validProps.setProperty("user", validuser1);
+		validProps.setProperty("password", validpassword1);
+		Properties invalidProps1 = new Properties();
+		invalidProps1.setProperty("user", invaliduser1);
+		invalidProps1.setProperty("password", invalidpassword1);
+		String[] invalidURLs = { null, validURL1, validURL1, invalidURL1,
+				invalidURL2, invalidURL3 };
+		Properties[] invalidProps = { validProps, nullProps, invalidProps1,
+				validProps, validProps, validProps };
+		String[] excMessage = { "The url cannot be null",
+				"Properties bundle is null",
+				"Userid and/or password not valid", "No suitable driver",
+				"No suitable driver", "No suitable driver" };
+
+		Connection theConnection = null;
+		Properties theProperties = null;
+		// validConnection - user & password required
+		try {
+			theConnection = DriverManager.getConnection(validURL1, validProps);
+			assertTrue(theConnection != null);
+		} catch (SQLException e) {
+			assertTrue(false);
+		} // end try
+
+		// invalid Connections
+		for (int i = 0; i < invalidURLs.length; i++) {
+			theConnection = null;
+			try {
+				theConnection = DriverManager.getConnection(invalidURLs[i],
+						invalidProps[i]);
+				assertFalse(theConnection != null);
+			} catch (SQLException e) {
+				// System.out.println("testGetConnectionStringStringString:
+				// exception message: " +
+				// e.getMessage() );
+				assertTrue(e.getMessage().equals(excMessage[i]));
+			} // end try
+		} // end for
+	} // end method testGetConnectionStringProperties()
+
+	/*
+	 * Class under test for Connection getConnection(String, String, String)
+	 */
+	public void testGetConnectionStringStringString() {
+		String validURL1 = "jdbc:mikes1:data2";
+		String validuser1 = "theuser";
+		String validpassword1 = "thepassword";
+		String invalidURL1 = "xyz:abc1:foo";
+		String invaliduser1 = "jonny nouser";
+		String invalidpassword1 = "whizz";
+		String[] invalid1 = { null, validuser1, validpassword1 };
+		String[] invalid2 = { validURL1, null, validpassword1 };
+		String[] invalid3 = { validURL1, validuser1, null };
+		String[] invalid4 = { invalidURL1, validuser1, validpassword1 };
+		String[] invalid5 = { validURL1, invaliduser1, invalidpassword1 };
+		String[] invalid6 = { validURL1, validuser1, invalidpassword1 };
+		String[][] invalid = { invalid1, invalid2, invalid3, invalid4,
+				invalid5, invalid6 };
+		String[] excMessage = { "The url cannot be null",
+				"Userid and/or password not supplied",
+				"Userid and/or password not supplied", "No suitable driver",
+				"Userid and/or password not valid",
+				"Userid and/or password not valid" };
+
+		Connection theConnection = null;
+		// validConnection - user & password required
+		try {
+			theConnection = DriverManager.getConnection(validURL1, validuser1,
+					validpassword1);
+			assertTrue(theConnection != null);
+		} catch (SQLException e) {
+			assertTrue(false);
+		} // end try
+
+		// invalid Connections
+		for (int i = 0; i < invalid.length; i++) {
+			theConnection = null;
+			String[] theData = invalid[i];
+			try {
+				theConnection = DriverManager.getConnection(theData[0],
+						theData[1], theData[2]);
+				assertFalse(theConnection != null);
+			} catch (SQLException e) {
+				// System.out.println("testGetConnectionStringStringString:
+				// exception message: " +
+				// e.getMessage() );
+				assertTrue(e.getMessage().equals(excMessage[i]));
+			} // end try
+		} // end for
+	} // end method testGetConnectionStringStringString()
+
+	static String validURL1 = "jdbc:mikes1";
+
+	static String validURL2 = "jdbc:mikes2";
+
+	static String invalidURL1 = "xyz:acb";
+
+	static String invalidURL2 = null;
+
+	static String[] validURLs = { validURL1, validURL2 };
+
+	static String[] invalidURLs = { invalidURL1, invalidURL2 };
+
+	static String exceptionMsg1 = "No suitable driver";
+
+	public void testGetDriver() {
+		// valid URLs
+		for (int i = 0; i < validURLs.length; i++) {
+			try {
+				Driver validDriver = DriverManager.getDriver(validURLs[i]);
+			} catch (SQLException e) {
+				fail(
+						"DriverManagerTest: getDriver failed for valid driver"
+								+ i);
+			} // end try
+		} // end for
+
+		// invalid URLs
+		for (int i = 0; i < invalidURLs.length; i++) {
+			try {
+				Driver invalidDriver = DriverManager.getDriver(invalidURLs[i]);
+			} catch (SQLException e) {
+				assertTrue(true);
+				// System.out.println("DriverManagerTest: getDriver failed for
+				// invalid driver");
+				// System.out.println("DriverManagerTest: exception message = "
+				// + e.getMessage() );
+				assertTrue(e.getMessage().equals(exceptionMsg1));
+			} // end try
+		} // end for
+
+	} // end method testGetDriver()
+
+	public void testGetDrivers() {
+		// Load a driver manager
+		Enumeration driverList = DriverManager.getDrivers();
+		int i = 0;
+		while (driverList.hasMoreElements()) {
+			Driver theDriver = (Driver) driverList.nextElement();
+			i++;
+		} // end while
+
+		// Check that all the drivers are in the list...
+		assertEquals("testGetDrivers: Don't see all the loaded drivers - ", i,
+				numberLoaded);
+	} // end method testGetDrivers()
+
+	static int timeout1 = 25;
+
+	public void testGetLoginTimeout() {
+		int theTimeout = DriverManager.getLoginTimeout();
+		// System.out.println("Default Login Timeout: " + theTimeout );
+
+		DriverManager.setLoginTimeout(timeout1);
+
+		assertTrue(DriverManager.getLoginTimeout() == timeout1);
+	} // end method testGetLoginTimeout()
+
+	public void testGetLogStream() {
+		assertTrue(DriverManager.getLogStream() == null);
+
+		DriverManager.setLogStream(testPrintStream);
+
+		assertTrue(DriverManager.getLogStream() == testPrintStream);
+
+		DriverManager.setLogStream(null);
+	} // end method testGetLogStream()
+
+	public void testGetLogWriter() {
+		assertTrue(DriverManager.getLogWriter() == null);
+
+		DriverManager.setLogWriter(testPrintWriter);
+
+		assertTrue(DriverManager.getLogWriter() == testPrintWriter);
+
+		DriverManager.setLogWriter(null);
+	} // end method testGetLogWriter()
+
+	static String testMessage = "DriverManagerTest: test message for print stream";
+
+	public void testPrintln() {
+		// System.out.println("testPrintln");
+		DriverManager.println(testMessage);
+
+		DriverManager.setLogWriter(testPrintWriter);
+		DriverManager.println(testMessage);
+
+		String theOutput = outputStream.toString();
+		// System.out.println("testPrintln: output= " + theOutput );
+		assertTrue(theOutput.startsWith(testMessage));
+
+		DriverManager.setLogWriter(null);
+
+		DriverManager.setLogStream(testPrintStream);
+		DriverManager.println(testMessage);
+
+		theOutput = outputStream2.toString();
+		// System.out.println("testPrintln: output= " + theOutput );
+		assertTrue(theOutput.startsWith(testMessage));
+
+		DriverManager.setLogStream(null);
+	} // end method testPrintln()
+
+	public void testRegisterDriver() {
+		String EXTRA_DRIVER_NAME = "tests.api.java.sql.TestHelper_Driver3";
+
+		try {
+			DriverManager.registerDriver(null);
+			fail(
+					"testRegisterDriver: Expected exception not thrown when registering null driver");
+		} catch (Exception e) {
+
+		} // end try
+
+		Driver theDriver = null;
+		// Load another Driver that isn't in the basic set
+		try {
+			Class driverClass = Class.forName(EXTRA_DRIVER_NAME);
+			theDriver = (Driver) driverClass.newInstance();
+			DriverManager.registerDriver(theDriver);
+		} catch (ClassNotFoundException cfe) {
+			fail("testRegisterDriver: Could not load extra driver");
+		} catch (Exception e) {
+			fail(
+					"testRegisterDriver: Exception while registering additional driver");
+		} // end try
+
+		assertTrue("testRegisterDriver: driver not in loaded set",
+				isDriverLoaded(theDriver));
+
+	} // end testRegisterDriver()
+
+	static int validTimeout1 = 15;
+
+	static int validTimeout2 = 0;
+
+	static int[] validTimeouts = { validTimeout1, validTimeout2 };
+
+	static int invalidTimeout1 = -10;
+
+	public void testSetLoginTimeout() {
+		// Valid timeouts
+		for (int i = 0; i < validTimeouts.length; i++) {
+			DriverManager.setLoginTimeout(validTimeouts[i]);
+
+			assertTrue(DriverManager.getLoginTimeout() == validTimeouts[i]);
+		} // end for
+		// Invalid timeouts
+		try {
+			DriverManager.setLoginTimeout(invalidTimeout1);
+			assertTrue(DriverManager.getLoginTimeout() == invalidTimeout1);
+		} catch (IllegalArgumentException e) {
+			System.out.println("DriverManagerTest: exception message = "
+					+ e.getMessage());
+		} // end try
+	} // end testSetLoginTimeout()
+
+	static ByteArrayOutputStream outputStream2 = new ByteArrayOutputStream();
+
+	static PrintStream testPrintStream = new PrintStream(outputStream2);
+
+	public void testSetLogStream() {
+		// System.out.println("testSetLogStream");
+		DriverManager.setLogStream(testPrintStream);
+
+		assertTrue(DriverManager.getLogStream() == testPrintStream);
+
+		DriverManager.setLogStream(null);
+
+		assertTrue(DriverManager.getLogStream() == null);
+
+		// Now let's deal with the case where there is a SecurityManager in
+		// place
+		TestSecurityManager theSecManager = new TestSecurityManager();
+		System.setSecurityManager(theSecManager);
+
+		theSecManager.setLogAccess(false);
+
+		try {
+			DriverManager.setLogStream(testPrintStream);
+			fail("testSetLogStream: Did not get security exception ");
+		} catch (SecurityException s) {
+
+		} catch (Throwable t) {
+			fail(
+					"testSetLogStream: Got exception but not get security exception ");
+		} // end try
+
+		theSecManager.setLogAccess(true);
+
+		try {
+			DriverManager.setLogStream(testPrintStream);
+		} catch (SecurityException s) {
+			fail(
+					"testSetLogStream: Got security exception but should not have");
+		} catch (Throwable t) {
+			fail(
+					"testSetLogStream: Got exception but not get security exception ");
+		} // end try
+
+		System.setSecurityManager(null);
+	} // end method testSetLogStream()
+
+	static ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+
+	static PrintWriter testPrintWriter = new PrintWriter(outputStream);
+
+	/**
+	 * Test for the setLogWriter method
+	 */
+	public void testSetLogWriter() {
+		// System.out.println("testSetLogWriter");
+		DriverManager.setLogWriter(testPrintWriter);
+
+		assertTrue("testDriverManager: Log writer not set:", DriverManager
+				.getLogWriter() == testPrintWriter);
+
+		DriverManager.setLogWriter(null);
+
+		assertTrue("testDriverManager: Log writer not null:", DriverManager
+				.getLogWriter() == null);
+
+		// Now let's deal with the case where there is a SecurityManager in
+		// place
+		TestSecurityManager theSecManager = new TestSecurityManager();
+		System.setSecurityManager(theSecManager);
+
+		theSecManager.setLogAccess(false);
+
+		try {
+			DriverManager.setLogWriter(testPrintWriter);
+			fail("testSetLogWriter: Did not get security exception ");
+		} catch (SecurityException s) {
+
+		} catch (Throwable t) {
+			fail(
+					"testSetLogWriter: Got exception but not get security exception ");
+		} // end try
+
+		theSecManager.setLogAccess(true);
+
+		try {
+			DriverManager.setLogWriter(testPrintWriter);
+		} catch (SecurityException s) {
+			fail(
+					"testSetLogWriter: Got security exception but should not have");
+		} catch (Throwable t) {
+			fail(
+					"testSetLogWriter: Got exception but not get security exception ");
+		} // end try
+
+		System.setSecurityManager(null);
+	} // end method testSetLogWriter()
+
+	/*
+	 * Method which loads a set of JDBC drivers ready for use by the various
+	 * tests @return the number of drivers loaded
+	 */
+	static boolean driversLoaded = false;
+
+	private static int loadDrivers() {
+		if (driversLoaded)
+			return numberLoaded;
+		/*
+		 * First define a value for the System property "jdbc.drivers" - before
+		 * the DriverManager class is loaded - this property defines a set of
+		 * drivers which the DriverManager will load during its initialization
+		 * and which will be loaded on the System ClassLoader - unlike the ones
+		 * loaded later by this method which are loaded on the Application
+		 * ClassLoader.
+		 */
+		int numberLoaded = 0;
+		String theSystemDrivers = DRIVER4 + ":" + DRIVER5 + ":"
+				+ INVALIDDRIVER1;
+		System.setProperty(JDBC_PROPERTY, theSystemDrivers);
+		numberLoaded += 2;
+
+		/*
+		 * Next, dynamically load a set of drivers
+		 */
+		for (int i = 0; i < driverNames.length; i++) {
+			try {
+				Class driverClass = Class.forName(driverNames[i]);
+				// System.out.println("Loaded driver - classloader = " +
+				// driverClass.getClassLoader());
+				numberLoaded++;
+			} catch (ClassNotFoundException e) {
+				System.out.println("DriverManagerTest: failed to load Driver: "
+						+ driverNames[i]);
+			} // end try
+		} // end for
+		/*
+		 * System.out.println("DriverManagerTest: number of drivers loaded: " +
+		 * numberLoaded);
+		 */
+		driversLoaded = true;
+		return numberLoaded;
+	} // end method loadDrivers()
+
+	class TestSecurityManager extends SecurityManager {
+
+		boolean logAccess = true;
+
+		SQLPermission sqlPermission = new SQLPermission("setLog");
+
+		RuntimePermission setManagerPermission = new RuntimePermission(
+				"setSecurityManager");
+
+		TestSecurityManager() {
+			super();
+		} // end method TestSecurityManager()
+
+		void setLogAccess(boolean allow) {
+			logAccess = allow;
+		} // end method setLogAccess( boolean )
+
+		public void checkPermission(Permission thePermission) {
+			if (thePermission.equals(sqlPermission)) {
+				if (!logAccess) {
+					throw new SecurityException("Cannot set the sql Log Writer");
+				} // end if
+				return;
+			} // end if
+
+			if (thePermission.equals(setManagerPermission)) {
+				return;
+			} // end if
+			// super.checkPermission( thePermission );
+		} // end method checkPermission( Permission )
+
+	} // end class TestSecurityManager
+
+} // end class DriverManagerTest
+
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/DriverPropertyInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/DriverPropertyInfoTest.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/DriverPropertyInfoTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/DriverPropertyInfoTest.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,104 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.sql.DriverPropertyInfo;
+
+import junit.framework.TestCase;
+
+/**
+ * JUnit Testcase for the java.sql.DriverPropertyInfo class
+ * 
+ */
+
+public class DriverPropertyInfoTest extends TestCase {
+
+	/*
+	 * Public statics test
+	 */
+	public void testPublicStatics() {
+
+	} // end method testPublicStatics
+
+	/*
+	 * Constructor test
+	 */
+	public void testDriverPropertyInfoStringString() {
+
+		DriverPropertyInfo aDriverPropertyInfo = new DriverPropertyInfo(
+				validName, validValue);
+
+		assertTrue(aDriverPropertyInfo != null);
+
+		aDriverPropertyInfo = new DriverPropertyInfo(null, null);
+
+	} // end method testDriverPropertyInfoStringString
+
+	/*
+	 * Public fields test
+	 */
+	static String validName = "testname";
+
+	static String validValue = "testvalue";
+
+	static String[] updateChoices = { "Choice1", "Choice2", "Choice3" };
+
+	static String updateValue = "updateValue";
+
+	static boolean updateRequired = true;
+
+	static String updateDescription = "update description";
+
+	static String updateName = "updateName";
+
+	public void testPublicFields() {
+
+		// Constructor here...
+		DriverPropertyInfo aDriverPropertyInfo = new DriverPropertyInfo(
+				validName, validValue);
+
+		assertTrue(aDriverPropertyInfo.choices == testChoices);
+		assertTrue(aDriverPropertyInfo.value == testValue);
+		assertTrue(aDriverPropertyInfo.required == testRequired);
+		assertTrue(aDriverPropertyInfo.description == testDescription);
+		assertTrue(aDriverPropertyInfo.name == testName);
+
+		aDriverPropertyInfo.choices = updateChoices;
+		aDriverPropertyInfo.value = updateValue;
+		aDriverPropertyInfo.required = updateRequired;
+		aDriverPropertyInfo.description = updateDescription;
+		aDriverPropertyInfo.name = updateName;
+
+		assertTrue(aDriverPropertyInfo.choices == updateChoices);
+		assertTrue(aDriverPropertyInfo.value == updateValue);
+		assertTrue(aDriverPropertyInfo.required == updateRequired);
+		assertTrue(aDriverPropertyInfo.description == updateDescription);
+		assertTrue(aDriverPropertyInfo.name == updateName);
+
+	} // end method testPublicFields
+
+	// Default values...
+	static String[] testChoices = null;
+
+	static java.lang.String testValue = validValue;
+
+	static boolean testRequired = false;
+
+	static java.lang.String testDescription = null;
+
+	static java.lang.String testName = validName;
+
+} // end class DriverPropertyInfoTest

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Array.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Array.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Array.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Array.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,79 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.sql.Array;
+import java.sql.ResultSet;
+import java.util.Map;
+
+public class Impl_Array implements Array {
+
+	public Impl_Array() {
+		super();
+	} // end constructor
+
+	public String getBaseTypeName() {
+
+		return null;
+	} // end method getBaseTypeName
+
+	public int getBaseType() {
+
+		return 2000135303;
+	} // end method getBaseType
+
+	public Object getArray() {
+
+		return null;
+	} // end method getArray
+
+	public Object getArray(Map parm1) {
+
+		return null;
+	} // end method getArray
+
+	public Object getArray(long parm1, int parm2) {
+
+		return null;
+	} // end method getArray
+
+	public Object getArray(long parm1, int parm2, Map parm3) {
+
+		return null;
+	} // end method getArray
+
+	public ResultSet getResultSet() {
+
+		return null;
+	} // end method getResultSet
+
+	public ResultSet getResultSet(Map parm1) {
+
+		return null;
+	} // end method getResultSet
+
+	public ResultSet getResultSet(long parm1, int parm2) {
+
+		return null;
+	} // end method getResultSet
+
+	public ResultSet getResultSet(long parm1, int parm2, Map parm3) {
+
+		return null;
+	} // end method getResultSet
+
+} // end class ArrayTest
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Connection.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Connection.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Connection.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Connection.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,204 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.PreparedStatement;
+import java.sql.SQLWarning;
+import java.sql.Savepoint;
+import java.sql.Statement;
+import java.util.Map;
+
+public class Impl_Connection implements Connection {
+
+	public Impl_Connection() {
+		super();
+	} // end constructor
+
+	public Statement createStatement() {
+
+		return null;
+	} // end method createStatement
+
+	public PreparedStatement prepareStatement(String parm1) {
+
+		return null;
+	} // end method prepareStatement
+
+	public CallableStatement prepareCall(String parm1) {
+
+		return null;
+	} // end method prepareCall
+
+	public String nativeSQL(String parm1) {
+
+		return null;
+	} // end method nativeSQL
+
+	public void setAutoCommit(boolean parm1) {
+
+	} // end method setAutoCommit
+
+	public boolean getAutoCommit() {
+
+		return false;
+	} // end method getAutoCommit
+
+	public void commit() {
+
+	} // end method commit
+
+	public void rollback() {
+
+	} // end method rollback
+
+	public void close() {
+
+	} // end method close
+
+	public boolean isClosed() {
+
+		return false;
+	} // end method isClosed
+
+	public DatabaseMetaData getMetaData() {
+
+		return null;
+	} // end method getMetaData
+
+	public void setReadOnly(boolean parm1) {
+
+	} // end method setReadOnly
+
+	public boolean isReadOnly() {
+
+		return true;
+	} // end method isReadOnly
+
+	public void setCatalog(String parm1) {
+
+	} // end method setCatalog
+
+	public String getCatalog() {
+
+		return null;
+	} // end method getCatalog
+
+	public void setTransactionIsolation(int parm1) {
+
+	} // end method setTransactionIsolation
+
+	public int getTransactionIsolation() {
+
+		return -1980410800;
+	} // end method getTransactionIsolation
+
+	public SQLWarning getWarnings() {
+
+		return null;
+	} // end method getWarnings
+
+	public void clearWarnings() {
+
+	} // end method clearWarnings
+
+	public Statement createStatement(int parm1, int parm2) {
+
+		return null;
+	} // end method createStatement
+
+	public PreparedStatement prepareStatement(String parm1, int parm2, int parm3) {
+
+		return null;
+	} // end method prepareStatement
+
+	public CallableStatement prepareCall(String parm1, int parm2, int parm3) {
+
+		return null;
+	} // end method prepareCall
+
+	public Map getTypeMap() {
+
+		return null;
+	} // end method getTypeMap
+
+	public void setTypeMap(Map parm1) {
+
+	} // end method setTypeMap
+
+	public void setHoldability(int parm1) {
+
+	} // end method setHoldability
+
+	public int getHoldability() {
+
+		return 632720050;
+	} // end method getHoldability
+
+	public Savepoint setSavepoint() {
+
+		return null;
+	} // end method setSavepoint
+
+	public Savepoint setSavepoint(String parm1) {
+
+		return null;
+	} // end method setSavepoint
+
+	public void rollback(Savepoint parm1) {
+
+	} // end method rollback
+
+	public void releaseSavepoint(Savepoint parm1) {
+
+	} // end method releaseSavepoint
+
+	public Statement createStatement(int parm1, int parm2, int parm3) {
+
+		return null;
+	} // end method createStatement
+
+	public PreparedStatement prepareStatement(String parm1, int parm2,
+			int parm3, int parm4) {
+
+		return null;
+	} // end method prepareStatement
+
+	public CallableStatement prepareCall(String parm1, int parm2, int parm3,
+			int parm4) {
+
+		return null;
+	} // end method prepareCall
+
+	public PreparedStatement prepareStatement(String parm1, int parm2) {
+
+		return null;
+	} // end method prepareStatement
+
+	public PreparedStatement prepareStatement(String parm1, int[] parm2) {
+
+		return null;
+	} // end method prepareStatement
+
+	public PreparedStatement prepareStatement(String parm1, String[] parm2) {
+
+		return null;
+	} // end method prepareStatement
+
+} // end class ConnectionTest
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_DatabaseMetaData.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_DatabaseMetaData.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_DatabaseMetaData.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_DatabaseMetaData.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,862 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+
+public class Impl_DatabaseMetaData implements DatabaseMetaData {
+
+	public Impl_DatabaseMetaData() {
+		super();
+	} // end constructor
+
+	public boolean allProceduresAreCallable() {
+
+		return true;
+	} // end method allProceduresAreCallable
+
+	public boolean allTablesAreSelectable() {
+
+		return true;
+	} // end method allTablesAreSelectable
+
+	public String getURL() {
+
+		return null;
+	} // end method getURL
+
+	public String getUserName() {
+
+		return null;
+	} // end method getUserName
+
+	public boolean isReadOnly() {
+
+		return true;
+	} // end method isReadOnly
+
+	public boolean nullsAreSortedHigh() {
+
+		return false;
+	} // end method nullsAreSortedHigh
+
+	public boolean nullsAreSortedLow() {
+
+		return false;
+	} // end method nullsAreSortedLow
+
+	public boolean nullsAreSortedAtStart() {
+
+		return true;
+	} // end method nullsAreSortedAtStart
+
+	public boolean nullsAreSortedAtEnd() {
+
+		return true;
+	} // end method nullsAreSortedAtEnd
+
+	public String getDatabaseProductName() {
+
+		return null;
+	} // end method getDatabaseProductName
+
+	public String getDatabaseProductVersion() {
+
+		return null;
+	} // end method getDatabaseProductVersion
+
+	public String getDriverName() {
+
+		return null;
+	} // end method getDriverName
+
+	public String getDriverVersion() {
+
+		return null;
+	} // end method getDriverVersion
+
+	public int getDriverMajorVersion() {
+
+		return 61603206;
+	} // end method getDriverMajorVersion
+
+	public int getDriverMinorVersion() {
+
+		return 833369254;
+	} // end method getDriverMinorVersion
+
+	public boolean usesLocalFiles() {
+
+		return false;
+	} // end method usesLocalFiles
+
+	public boolean usesLocalFilePerTable() {
+
+		return false;
+	} // end method usesLocalFilePerTable
+
+	public boolean supportsMixedCaseIdentifiers() {
+
+		return false;
+	} // end method supportsMixedCaseIdentifiers
+
+	public boolean storesUpperCaseIdentifiers() {
+
+		return false;
+	} // end method storesUpperCaseIdentifiers
+
+	public boolean storesLowerCaseIdentifiers() {
+
+		return true;
+	} // end method storesLowerCaseIdentifiers
+
+	public boolean storesMixedCaseIdentifiers() {
+
+		return true;
+	} // end method storesMixedCaseIdentifiers
+
+	public boolean supportsMixedCaseQuotedIdentifiers() {
+
+		return true;
+	} // end method supportsMixedCaseQuotedIdentifiers
+
+	public boolean storesUpperCaseQuotedIdentifiers() {
+
+		return true;
+	} // end method storesUpperCaseQuotedIdentifiers
+
+	public boolean storesLowerCaseQuotedIdentifiers() {
+
+		return true;
+	} // end method storesLowerCaseQuotedIdentifiers
+
+	public boolean storesMixedCaseQuotedIdentifiers() {
+
+		return false;
+	} // end method storesMixedCaseQuotedIdentifiers
+
+	public String getIdentifierQuoteString() {
+
+		return null;
+	} // end method getIdentifierQuoteString
+
+	public String getSQLKeywords() {
+
+		return null;
+	} // end method getSQLKeywords
+
+	public String getNumericFunctions() {
+
+		return null;
+	} // end method getNumericFunctions
+
+	public String getStringFunctions() {
+
+		return null;
+	} // end method getStringFunctions
+
+	public String getSystemFunctions() {
+
+		return null;
+	} // end method getSystemFunctions
+
+	public String getTimeDateFunctions() {
+
+		return null;
+	} // end method getTimeDateFunctions
+
+	public String getSearchStringEscape() {
+
+		return null;
+	} // end method getSearchStringEscape
+
+	public String getExtraNameCharacters() {
+
+		return null;
+	} // end method getExtraNameCharacters
+
+	public boolean supportsAlterTableWithAddColumn() {
+
+		return false;
+	} // end method supportsAlterTableWithAddColumn
+
+	public boolean supportsAlterTableWithDropColumn() {
+
+		return false;
+	} // end method supportsAlterTableWithDropColumn
+
+	public boolean supportsColumnAliasing() {
+
+		return true;
+	} // end method supportsColumnAliasing
+
+	public boolean nullPlusNonNullIsNull() {
+
+		return false;
+	} // end method nullPlusNonNullIsNull
+
+	public boolean supportsConvert() {
+
+		return false;
+	} // end method supportsConvert
+
+	public boolean supportsConvert(int parm1, int parm2) {
+
+		return false;
+	} // end method supportsConvert
+
+	public boolean supportsTableCorrelationNames() {
+
+		return true;
+	} // end method supportsTableCorrelationNames
+
+	public boolean supportsDifferentTableCorrelationNames() {
+
+		return false;
+	} // end method supportsDifferentTableCorrelationNames
+
+	public boolean supportsExpressionsInOrderBy() {
+
+		return true;
+	} // end method supportsExpressionsInOrderBy
+
+	public boolean supportsOrderByUnrelated() {
+
+		return true;
+	} // end method supportsOrderByUnrelated
+
+	public boolean supportsGroupBy() {
+
+		return true;
+	} // end method supportsGroupBy
+
+	public boolean supportsGroupByUnrelated() {
+
+		return true;
+	} // end method supportsGroupByUnrelated
+
+	public boolean supportsGroupByBeyondSelect() {
+
+		return false;
+	} // end method supportsGroupByBeyondSelect
+
+	public boolean supportsLikeEscapeClause() {
+
+		return false;
+	} // end method supportsLikeEscapeClause
+
+	public boolean supportsMultipleResultSets() {
+
+		return false;
+	} // end method supportsMultipleResultSets
+
+	public boolean supportsMultipleTransactions() {
+
+		return false;
+	} // end method supportsMultipleTransactions
+
+	public boolean supportsNonNullableColumns() {
+
+		return false;
+	} // end method supportsNonNullableColumns
+
+	public boolean supportsMinimumSQLGrammar() {
+
+		return true;
+	} // end method supportsMinimumSQLGrammar
+
+	public boolean supportsCoreSQLGrammar() {
+
+		return true;
+	} // end method supportsCoreSQLGrammar
+
+	public boolean supportsExtendedSQLGrammar() {
+
+		return false;
+	} // end method supportsExtendedSQLGrammar
+
+	public boolean supportsANSI92EntryLevelSQL() {
+
+		return true;
+	} // end method supportsANSI92EntryLevelSQL
+
+	public boolean supportsANSI92IntermediateSQL() {
+
+		return true;
+	} // end method supportsANSI92IntermediateSQL
+
+	public boolean supportsANSI92FullSQL() {
+
+		return true;
+	} // end method supportsANSI92FullSQL
+
+	public boolean supportsIntegrityEnhancementFacility() {
+
+		return false;
+	} // end method supportsIntegrityEnhancementFacility
+
+	public boolean supportsOuterJoins() {
+
+		return false;
+	} // end method supportsOuterJoins
+
+	public boolean supportsFullOuterJoins() {
+
+		return true;
+	} // end method supportsFullOuterJoins
+
+	public boolean supportsLimitedOuterJoins() {
+
+		return false;
+	} // end method supportsLimitedOuterJoins
+
+	public String getSchemaTerm() {
+
+		return null;
+	} // end method getSchemaTerm
+
+	public String getProcedureTerm() {
+
+		return null;
+	} // end method getProcedureTerm
+
+	public String getCatalogTerm() {
+
+		return null;
+	} // end method getCatalogTerm
+
+	public boolean isCatalogAtStart() {
+
+		return true;
+	} // end method isCatalogAtStart
+
+	public String getCatalogSeparator() {
+
+		return null;
+	} // end method getCatalogSeparator
+
+	public boolean supportsSchemasInDataManipulation() {
+
+		return false;
+	} // end method supportsSchemasInDataManipulation
+
+	public boolean supportsSchemasInProcedureCalls() {
+
+		return false;
+	} // end method supportsSchemasInProcedureCalls
+
+	public boolean supportsSchemasInTableDefinitions() {
+
+		return true;
+	} // end method supportsSchemasInTableDefinitions
+
+	public boolean supportsSchemasInIndexDefinitions() {
+
+		return true;
+	} // end method supportsSchemasInIndexDefinitions
+
+	public boolean supportsSchemasInPrivilegeDefinitions() {
+
+		return false;
+	} // end method supportsSchemasInPrivilegeDefinitions
+
+	public boolean supportsCatalogsInDataManipulation() {
+
+		return false;
+	} // end method supportsCatalogsInDataManipulation
+
+	public boolean supportsCatalogsInProcedureCalls() {
+
+		return false;
+	} // end method supportsCatalogsInProcedureCalls
+
+	public boolean supportsCatalogsInTableDefinitions() {
+
+		return false;
+	} // end method supportsCatalogsInTableDefinitions
+
+	public boolean supportsCatalogsInIndexDefinitions() {
+
+		return true;
+	} // end method supportsCatalogsInIndexDefinitions
+
+	public boolean supportsCatalogsInPrivilegeDefinitions() {
+
+		return false;
+	} // end method supportsCatalogsInPrivilegeDefinitions
+
+	public boolean supportsPositionedDelete() {
+
+		return true;
+	} // end method supportsPositionedDelete
+
+	public boolean supportsPositionedUpdate() {
+
+		return true;
+	} // end method supportsPositionedUpdate
+
+	public boolean supportsSelectForUpdate() {
+
+		return true;
+	} // end method supportsSelectForUpdate
+
+	public boolean supportsStoredProcedures() {
+
+		return true;
+	} // end method supportsStoredProcedures
+
+	public boolean supportsSubqueriesInComparisons() {
+
+		return true;
+	} // end method supportsSubqueriesInComparisons
+
+	public boolean supportsSubqueriesInExists() {
+
+		return false;
+	} // end method supportsSubqueriesInExists
+
+	public boolean supportsSubqueriesInIns() {
+
+		return false;
+	} // end method supportsSubqueriesInIns
+
+	public boolean supportsSubqueriesInQuantifieds() {
+
+		return false;
+	} // end method supportsSubqueriesInQuantifieds
+
+	public boolean supportsCorrelatedSubqueries() {
+
+		return true;
+	} // end method supportsCorrelatedSubqueries
+
+	public boolean supportsUnion() {
+
+		return true;
+	} // end method supportsUnion
+
+	public boolean supportsUnionAll() {
+
+		return false;
+	} // end method supportsUnionAll
+
+	public boolean supportsOpenCursorsAcrossCommit() {
+
+		return true;
+	} // end method supportsOpenCursorsAcrossCommit
+
+	public boolean supportsOpenCursorsAcrossRollback() {
+
+		return true;
+	} // end method supportsOpenCursorsAcrossRollback
+
+	public boolean supportsOpenStatementsAcrossCommit() {
+
+		return true;
+	} // end method supportsOpenStatementsAcrossCommit
+
+	public boolean supportsOpenStatementsAcrossRollback() {
+
+		return false;
+	} // end method supportsOpenStatementsAcrossRollback
+
+	public int getMaxBinaryLiteralLength() {
+
+		return 362957471;
+	} // end method getMaxBinaryLiteralLength
+
+	public int getMaxCharLiteralLength() {
+
+		return 1550865190;
+	} // end method getMaxCharLiteralLength
+
+	public int getMaxColumnNameLength() {
+
+		return 876239751;
+	} // end method getMaxColumnNameLength
+
+	public int getMaxColumnsInGroupBy() {
+
+		return 1862881253;
+	} // end method getMaxColumnsInGroupBy
+
+	public int getMaxColumnsInIndex() {
+
+		return 830898910;
+	} // end method getMaxColumnsInIndex
+
+	public int getMaxColumnsInOrderBy() {
+
+		return 1749757802;
+	} // end method getMaxColumnsInOrderBy
+
+	public int getMaxColumnsInSelect() {
+
+		return 26691343;
+	} // end method getMaxColumnsInSelect
+
+	public int getMaxColumnsInTable() {
+
+		return 2040676013;
+	} // end method getMaxColumnsInTable
+
+	public int getMaxConnections() {
+
+		return 424071034;
+	} // end method getMaxConnections
+
+	public int getMaxCursorNameLength() {
+
+		return -1731767936;
+	} // end method getMaxCursorNameLength
+
+	public int getMaxIndexLength() {
+
+		return -1478012889;
+	} // end method getMaxIndexLength
+
+	public int getMaxSchemaNameLength() {
+
+		return 1031741715;
+	} // end method getMaxSchemaNameLength
+
+	public int getMaxProcedureNameLength() {
+
+		return -1317963516;
+	} // end method getMaxProcedureNameLength
+
+	public int getMaxCatalogNameLength() {
+
+		return 66984415;
+	} // end method getMaxCatalogNameLength
+
+	public int getMaxRowSize() {
+
+		return 746561690;
+	} // end method getMaxRowSize
+
+	public boolean doesMaxRowSizeIncludeBlobs() {
+
+		return false;
+	} // end method doesMaxRowSizeIncludeBlobs
+
+	public int getMaxStatementLength() {
+
+		return -1774364912;
+	} // end method getMaxStatementLength
+
+	public int getMaxStatements() {
+
+		return -150904006;
+	} // end method getMaxStatements
+
+	public int getMaxTableNameLength() {
+
+		return -1193255272;
+	} // end method getMaxTableNameLength
+
+	public int getMaxTablesInSelect() {
+
+		return -835633948;
+	} // end method getMaxTablesInSelect
+
+	public int getMaxUserNameLength() {
+
+		return 1633873125;
+	} // end method getMaxUserNameLength
+
+	public int getDefaultTransactionIsolation() {
+
+		return 1017227733;
+	} // end method getDefaultTransactionIsolation
+
+	public boolean supportsTransactions() {
+
+		return false;
+	} // end method supportsTransactions
+
+	public boolean supportsTransactionIsolationLevel(int parm1) {
+
+		return false;
+	} // end method supportsTransactionIsolationLevel
+
+	public boolean supportsDataDefinitionAndDataManipulationTransactions() {
+
+		return true;
+	} // end method supportsDataDefinitionAndDataManipulationTransactions
+
+	public boolean supportsDataManipulationTransactionsOnly() {
+
+		return false;
+	} // end method supportsDataManipulationTransactionsOnly
+
+	public boolean dataDefinitionCausesTransactionCommit() {
+
+		return false;
+	} // end method dataDefinitionCausesTransactionCommit
+
+	public boolean dataDefinitionIgnoredInTransactions() {
+
+		return false;
+	} // end method dataDefinitionIgnoredInTransactions
+
+	public ResultSet getProcedures(String parm1, String parm2, String parm3) {
+
+		return null;
+	} // end method getProcedures
+
+	public ResultSet getProcedureColumns(String parm1, String parm2,
+			String parm3, String parm4) {
+
+		return null;
+	} // end method getProcedureColumns
+
+	public ResultSet getTables(String parm1, String parm2, String parm3,
+			String[] parm4) {
+
+		return null;
+	} // end method getTables
+
+	public ResultSet getSchemas() {
+
+		return null;
+	} // end method getSchemas
+
+	public ResultSet getCatalogs() {
+
+		return null;
+	} // end method getCatalogs
+
+	public ResultSet getTableTypes() {
+
+		return null;
+	} // end method getTableTypes
+
+	public ResultSet getColumns(String parm1, String parm2, String parm3,
+			String parm4) {
+
+		return null;
+	} // end method getColumns
+
+	public ResultSet getColumnPrivileges(String parm1, String parm2,
+			String parm3, String parm4) {
+
+		return null;
+	} // end method getColumnPrivileges
+
+	public ResultSet getTablePrivileges(String parm1, String parm2, String parm3) {
+
+		return null;
+	} // end method getTablePrivileges
+
+	public ResultSet getBestRowIdentifier(String parm1, String parm2,
+			String parm3, int parm4, boolean parm5) {
+
+		return null;
+	} // end method getBestRowIdentifier
+
+	public ResultSet getVersionColumns(String parm1, String parm2, String parm3) {
+
+		return null;
+	} // end method getVersionColumns
+
+	public ResultSet getPrimaryKeys(String parm1, String parm2, String parm3) {
+
+		return null;
+	} // end method getPrimaryKeys
+
+	public ResultSet getImportedKeys(String parm1, String parm2, String parm3) {
+
+		return null;
+	} // end method getImportedKeys
+
+	public ResultSet getExportedKeys(String parm1, String parm2, String parm3) {
+
+		return null;
+	} // end method getExportedKeys
+
+	public ResultSet getCrossReference(String parm1, String parm2,
+			String parm3, String parm4, String parm5, String parm6) {
+
+		return null;
+	} // end method getCrossReference
+
+	public ResultSet getTypeInfo() {
+
+		return null;
+	} // end method getTypeInfo
+
+	public ResultSet getIndexInfo(String parm1, String parm2, String parm3,
+			boolean parm4, boolean parm5) {
+
+		return null;
+	} // end method getIndexInfo
+
+	public boolean supportsResultSetType(int parm1) {
+
+		return true;
+	} // end method supportsResultSetType
+
+	public boolean supportsResultSetConcurrency(int parm1, int parm2) {
+
+		return true;
+	} // end method supportsResultSetConcurrency
+
+	public boolean ownUpdatesAreVisible(int parm1) {
+
+		return false;
+	} // end method ownUpdatesAreVisible
+
+	public boolean ownDeletesAreVisible(int parm1) {
+
+		return false;
+	} // end method ownDeletesAreVisible
+
+	public boolean ownInsertsAreVisible(int parm1) {
+
+		return true;
+	} // end method ownInsertsAreVisible
+
+	public boolean othersUpdatesAreVisible(int parm1) {
+
+		return true;
+	} // end method othersUpdatesAreVisible
+
+	public boolean othersDeletesAreVisible(int parm1) {
+
+		return true;
+	} // end method othersDeletesAreVisible
+
+	public boolean othersInsertsAreVisible(int parm1) {
+
+		return true;
+	} // end method othersInsertsAreVisible
+
+	public boolean updatesAreDetected(int parm1) {
+
+		return false;
+	} // end method updatesAreDetected
+
+	public boolean deletesAreDetected(int parm1) {
+
+		return true;
+	} // end method deletesAreDetected
+
+	public boolean insertsAreDetected(int parm1) {
+
+		return true;
+	} // end method insertsAreDetected
+
+	public boolean supportsBatchUpdates() {
+
+		return false;
+	} // end method supportsBatchUpdates
+
+	public ResultSet getUDTs(String parm1, String parm2, String parm3,
+			int[] parm4) {
+
+		return null;
+	} // end method getUDTs
+
+	public Connection getConnection() {
+
+		return null;
+	} // end method getConnection
+
+	public boolean supportsSavepoints() {
+
+		return false;
+	} // end method supportsSavepoints
+
+	public boolean supportsNamedParameters() {
+
+		return false;
+	} // end method supportsNamedParameters
+
+	public boolean supportsMultipleOpenResults() {
+
+		return false;
+	} // end method supportsMultipleOpenResults
+
+	public boolean supportsGetGeneratedKeys() {
+
+		return false;
+	} // end method supportsGetGeneratedKeys
+
+	public ResultSet getSuperTypes(String parm1, String parm2, String parm3) {
+
+		return null;
+	} // end method getSuperTypes
+
+	public ResultSet getSuperTables(String parm1, String parm2, String parm3) {
+
+		return null;
+	} // end method getSuperTables
+
+	public ResultSet getAttributes(String parm1, String parm2, String parm3,
+			String parm4) {
+
+		return null;
+	} // end method getAttributes
+
+	public boolean supportsResultSetHoldability(int parm1) {
+
+		return true;
+	} // end method supportsResultSetHoldability
+
+	public int getResultSetHoldability() {
+
+		return 2084363747;
+	} // end method getResultSetHoldability
+
+	public int getDatabaseMajorVersion() {
+
+		return -984289201;
+	} // end method getDatabaseMajorVersion
+
+	public int getDatabaseMinorVersion() {
+
+		return -19204050;
+	} // end method getDatabaseMinorVersion
+
+	public int getJDBCMajorVersion() {
+
+		return -935937342;
+	} // end method getJDBCMajorVersion
+
+	public int getJDBCMinorVersion() {
+
+		return 1874384348;
+	} // end method getJDBCMinorVersion
+
+	public int getSQLStateType() {
+
+		return 802510040;
+	} // end method getSQLStateType
+
+	public boolean locatorsUpdateCopy() {
+
+		return true;
+	} // end method locatorsUpdateCopy
+
+	public boolean supportsStatementPooling() {
+
+		return false;
+	} // end method supportsStatementPooling
+
+} // end class DatabaseMetaDataTest

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ParameterMetaData.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ParameterMetaData.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ParameterMetaData.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ParameterMetaData.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,72 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.sql.ParameterMetaData;
+
+public class Impl_ParameterMetaData implements ParameterMetaData {
+
+	public Impl_ParameterMetaData() {
+		super();
+	} // end constructor
+
+	public int getParameterCount() {
+
+		return -635215530;
+	} // end method getParameterCount
+
+	public int isNullable(int parm1) {
+
+		return 548204022;
+	} // end method isNullable
+
+	public boolean isSigned(int parm1) {
+
+		return true;
+	} // end method isSigned
+
+	public int getPrecision(int parm1) {
+
+		return -128790345;
+	} // end method getPrecision
+
+	public int getScale(int parm1) {
+
+		return 632158565;
+	} // end method getScale
+
+	public int getParameterType(int parm1) {
+
+		return 1475713428;
+	} // end method getParameterType
+
+	public String getParameterTypeName(int parm1) {
+
+		return null;
+	} // end method getParameterTypeName
+
+	public String getParameterClassName(int parm1) {
+
+		return null;
+	} // end method getParameterClassName
+
+	public int getParameterMode(int parm1) {
+
+		return -551156226;
+	} // end method getParameterMode
+
+} // end class ParameterMetaDataTest
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ResultSet.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ResultSet.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ResultSet.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ResultSet.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,679 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Date;
+import java.sql.Ref;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLWarning;
+import java.sql.Statement;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.Map;
+
+public class Impl_ResultSet implements ResultSet {
+
+	public Impl_ResultSet() {
+		super();
+	} // end constructor
+
+	public boolean next() {
+
+		return true;
+	} // end method next
+
+	public void close() {
+
+	} // end method close
+
+	public boolean wasNull() {
+
+		return true;
+	} // end method wasNull
+
+	public String getString(int parm1) {
+
+		return null;
+	} // end method getString
+
+	public boolean getBoolean(int parm1) {
+
+		return true;
+	} // end method getBoolean
+
+	public byte getByte(int parm1) {
+
+		return -8;
+	} // end method getByte
+
+	public short getShort(int parm1) {
+
+		return -12790;
+	} // end method getShort
+
+	public int getInt(int parm1) {
+
+		return -1790920813;
+	} // end method getInt
+
+	public long getLong(int parm1) {
+
+		return -7236492308370801956L;
+	} // end method getLong
+
+	public float getFloat(int parm1) {
+
+		return -1.4686295075661984E37F;
+	} // end method getFloat
+
+	public double getDouble(int parm1) {
+
+		return -1.6820553969741622E308;
+	} // end method getDouble
+
+	public BigDecimal getBigDecimal(int parm1, int parm2) {
+
+		return null;
+	} // end method getBigDecimal
+
+	public byte[] getBytes(int parm1) {
+
+		return null;
+	} // end method getBytes
+
+	public Date getDate(int parm1) {
+
+		return null;
+	} // end method getDate
+
+	public Time getTime(int parm1) {
+
+		return null;
+	} // end method getTime
+
+	public Timestamp getTimestamp(int parm1) {
+
+		return null;
+	} // end method getTimestamp
+
+	public InputStream getAsciiStream(int parm1) {
+
+		return null;
+	} // end method getAsciiStream
+
+	public InputStream getUnicodeStream(int parm1) {
+
+		return null;
+	} // end method getUnicodeStream
+
+	public InputStream getBinaryStream(int parm1) {
+
+		return null;
+	} // end method getBinaryStream
+
+	public String getString(String parm1) {
+
+		return null;
+	} // end method getString
+
+	public boolean getBoolean(String parm1) {
+
+		return false;
+	} // end method getBoolean
+
+	public byte getByte(String parm1) {
+
+		return -10;
+	} // end method getByte
+
+	public short getShort(String parm1) {
+
+		return 13590;
+	} // end method getShort
+
+	public int getInt(String parm1) {
+
+		return 522475063;
+	} // end method getInt
+
+	public long getLong(String parm1) {
+
+		return 6637918619301232066L;
+	} // end method getLong
+
+	public float getFloat(String parm1) {
+
+		return 8.388008941813566E37F;
+	} // end method getFloat
+
+	public double getDouble(String parm1) {
+
+		return 4.221562126032334E307;
+	} // end method getDouble
+
+	public BigDecimal getBigDecimal(String parm1, int parm2) {
+
+		return null;
+	} // end method getBigDecimal
+
+	public byte[] getBytes(String parm1) {
+
+		return null;
+	} // end method getBytes
+
+	public Date getDate(String parm1) {
+
+		return null;
+	} // end method getDate
+
+	public Time getTime(String parm1) {
+
+		return null;
+	} // end method getTime
+
+	public Timestamp getTimestamp(String parm1) {
+
+		return null;
+	} // end method getTimestamp
+
+	public InputStream getAsciiStream(String parm1) {
+
+		return null;
+	} // end method getAsciiStream
+
+	public InputStream getUnicodeStream(String parm1) {
+
+		return null;
+	} // end method getUnicodeStream
+
+	public InputStream getBinaryStream(String parm1) {
+
+		return null;
+	} // end method getBinaryStream
+
+	public SQLWarning getWarnings() {
+
+		return null;
+	} // end method getWarnings
+
+	public void clearWarnings() {
+
+	} // end method clearWarnings
+
+	public String getCursorName() {
+
+		return null;
+	} // end method getCursorName
+
+	public ResultSetMetaData getMetaData() {
+
+		return null;
+	} // end method getMetaData
+
+	public Object getObject(int parm1) {
+
+		return null;
+	} // end method getObject
+
+	public Object getObject(String parm1) {
+
+		return null;
+	} // end method getObject
+
+	public int findColumn(String parm1) {
+
+		return 24975593;
+	} // end method findColumn
+
+	public Reader getCharacterStream(int parm1) {
+
+		return null;
+	} // end method getCharacterStream
+
+	public Reader getCharacterStream(String parm1) {
+
+		return null;
+	} // end method getCharacterStream
+
+	public BigDecimal getBigDecimal(int parm1) {
+
+		return null;
+	} // end method getBigDecimal
+
+	public BigDecimal getBigDecimal(String parm1) {
+
+		return null;
+	} // end method getBigDecimal
+
+	public boolean isBeforeFirst() {
+
+		return false;
+	} // end method isBeforeFirst
+
+	public boolean isAfterLast() {
+
+		return true;
+	} // end method isAfterLast
+
+	public boolean isFirst() {
+
+		return true;
+	} // end method isFirst
+
+	public boolean isLast() {
+
+		return true;
+	} // end method isLast
+
+	public void beforeFirst() {
+
+	} // end method beforeFirst
+
+	public void afterLast() {
+
+	} // end method afterLast
+
+	public boolean first() {
+
+		return true;
+	} // end method first
+
+	public boolean last() {
+
+		return false;
+	} // end method last
+
+	public int getRow() {
+
+		return -1536752422;
+	} // end method getRow
+
+	public boolean absolute(int parm1) {
+
+		return false;
+	} // end method absolute
+
+	public boolean relative(int parm1) {
+
+		return true;
+	} // end method relative
+
+	public boolean previous() {
+
+		return true;
+	} // end method previous
+
+	public void setFetchDirection(int parm1) {
+
+	} // end method setFetchDirection
+
+	public int getFetchDirection() {
+
+		return -1136843877;
+	} // end method getFetchDirection
+
+	public void setFetchSize(int parm1) {
+
+	} // end method setFetchSize
+
+	public int getFetchSize() {
+
+		return -2139697329;
+	} // end method getFetchSize
+
+	public int getType() {
+
+		return -631961459;
+	} // end method getType
+
+	public int getConcurrency() {
+
+		return 6231768;
+	} // end method getConcurrency
+
+	public boolean rowUpdated() {
+
+		return true;
+	} // end method rowUpdated
+
+	public boolean rowInserted() {
+
+		return true;
+	} // end method rowInserted
+
+	public boolean rowDeleted() {
+
+		return true;
+	} // end method rowDeleted
+
+	public void updateNull(int parm1) {
+
+	} // end method updateNull
+
+	public void updateBoolean(int parm1, boolean parm2) {
+
+	} // end method updateBoolean
+
+	public void updateByte(int parm1, byte parm2) {
+
+	} // end method updateByte
+
+	public void updateShort(int parm1, short parm2) {
+
+	} // end method updateShort
+
+	public void updateInt(int parm1, int parm2) {
+
+	} // end method updateInt
+
+	public void updateLong(int parm1, long parm2) {
+
+	} // end method updateLong
+
+	public void updateFloat(int parm1, float parm2) {
+
+	} // end method updateFloat
+
+	public void updateDouble(int parm1, double parm2) {
+
+	} // end method updateDouble
+
+	public void updateBigDecimal(int parm1, BigDecimal parm2) {
+
+	} // end method updateBigDecimal
+
+	public void updateString(int parm1, String parm2) {
+
+	} // end method updateString
+
+	public void updateBytes(int parm1, byte[] parm2) {
+
+	} // end method updateBytes
+
+	public void updateDate(int parm1, Date parm2) {
+
+	} // end method updateDate
+
+	public void updateTime(int parm1, Time parm2) {
+
+	} // end method updateTime
+
+	public void updateTimestamp(int parm1, Timestamp parm2) {
+
+	} // end method updateTimestamp
+
+	public void updateAsciiStream(int parm1, InputStream parm2, int parm3) {
+
+	} // end method updateAsciiStream
+
+	public void updateBinaryStream(int parm1, InputStream parm2, int parm3) {
+
+	} // end method updateBinaryStream
+
+	public void updateCharacterStream(int parm1, Reader parm2, int parm3) {
+
+	} // end method updateCharacterStream
+
+	public void updateObject(int parm1, Object parm2, int parm3) {
+
+	} // end method updateObject
+
+	public void updateObject(int parm1, Object parm2) {
+
+	} // end method updateObject
+
+	public void updateNull(String parm1) {
+
+	} // end method updateNull
+
+	public void updateBoolean(String parm1, boolean parm2) {
+
+	} // end method updateBoolean
+
+	public void updateByte(String parm1, byte parm2) {
+
+	} // end method updateByte
+
+	public void updateShort(String parm1, short parm2) {
+
+	} // end method updateShort
+
+	public void updateInt(String parm1, int parm2) {
+
+	} // end method updateInt
+
+	public void updateLong(String parm1, long parm2) {
+
+	} // end method updateLong
+
+	public void updateFloat(String parm1, float parm2) {
+
+	} // end method updateFloat
+
+	public void updateDouble(String parm1, double parm2) {
+
+	} // end method updateDouble
+
+	public void updateBigDecimal(String parm1, BigDecimal parm2) {
+
+	} // end method updateBigDecimal
+
+	public void updateString(String parm1, String parm2) {
+
+	} // end method updateString
+
+	public void updateBytes(String parm1, byte[] parm2) {
+
+	} // end method updateBytes
+
+	public void updateDate(String parm1, Date parm2) {
+
+	} // end method updateDate
+
+	public void updateTime(String parm1, Time parm2) {
+
+	} // end method updateTime
+
+	public void updateTimestamp(String parm1, Timestamp parm2) {
+
+	} // end method updateTimestamp
+
+	public void updateAsciiStream(String parm1, InputStream parm2, int parm3) {
+
+	} // end method updateAsciiStream
+
+	public void updateBinaryStream(String parm1, InputStream parm2, int parm3) {
+
+	} // end method updateBinaryStream
+
+	public void updateCharacterStream(String parm1, Reader parm2, int parm3) {
+
+	} // end method updateCharacterStream
+
+	public void updateObject(String parm1, Object parm2, int parm3) {
+
+	} // end method updateObject
+
+	public void updateObject(String parm1, Object parm2) {
+
+	} // end method updateObject
+
+	public void insertRow() {
+
+	} // end method insertRow
+
+	public void updateRow() {
+
+	} // end method updateRow
+
+	public void deleteRow() {
+
+	} // end method deleteRow
+
+	public void refreshRow() {
+
+	} // end method refreshRow
+
+	public void cancelRowUpdates() {
+
+	} // end method cancelRowUpdates
+
+	public void moveToInsertRow() {
+
+	} // end method moveToInsertRow
+
+	public void moveToCurrentRow() {
+
+	} // end method moveToCurrentRow
+
+	public Statement getStatement() {
+
+		return null;
+	} // end method getStatement
+
+	public Object getObject(int parm1, Map parm2) {
+
+		return null;
+	} // end method getObject
+
+	public Ref getRef(int parm1) {
+
+		return null;
+	} // end method getRef
+
+	public Blob getBlob(int parm1) {
+
+		return null;
+	} // end method getBlob
+
+	public Clob getClob(int parm1) {
+
+		return null;
+	} // end method getClob
+
+	public Array getArray(int parm1) {
+
+		return null;
+	} // end method getArray
+
+	public Object getObject(String parm1, Map parm2) {
+
+		return null;
+	} // end method getObject
+
+	public Ref getRef(String parm1) {
+
+		return null;
+	} // end method getRef
+
+	public Blob getBlob(String parm1) {
+
+		return null;
+	} // end method getBlob
+
+	public Clob getClob(String parm1) {
+
+		return null;
+	} // end method getClob
+
+	public Array getArray(String parm1) {
+
+		return null;
+	} // end method getArray
+
+	public Date getDate(int parm1, Calendar parm2) {
+
+		return null;
+	} // end method getDate
+
+	public Date getDate(String parm1, Calendar parm2) {
+
+		return null;
+	} // end method getDate
+
+	public Time getTime(int parm1, Calendar parm2) {
+
+		return null;
+	} // end method getTime
+
+	public Time getTime(String parm1, Calendar parm2) {
+
+		return null;
+	} // end method getTime
+
+	public Timestamp getTimestamp(int parm1, Calendar parm2) {
+
+		return null;
+	} // end method getTimestamp
+
+	public Timestamp getTimestamp(String parm1, Calendar parm2) {
+
+		return null;
+	} // end method getTimestamp
+
+	public URL getURL(int parm1) {
+
+		return null;
+	} // end method getURL
+
+	public URL getURL(String parm1) {
+
+		return null;
+	} // end method getURL
+
+	public void updateRef(int parm1, Ref parm2) {
+
+	} // end method updateRef
+
+	public void updateRef(String parm1, Ref parm2) {
+
+	} // end method updateRef
+
+	public void updateBlob(int parm1, Blob parm2) {
+
+	} // end method updateBlob
+
+	public void updateBlob(String parm1, Blob parm2) {
+
+	} // end method updateBlob
+
+	public void updateClob(int parm1, Clob parm2) {
+
+	} // end method updateClob
+
+	public void updateClob(String parm1, Clob parm2) {
+
+	} // end method updateClob
+
+	public void updateArray(int parm1, Array parm2) {
+
+	} // end method updateArray
+
+	public void updateArray(String parm1, Array parm2) {
+
+	} // end method updateArray
+
+} // end class ResultSetTest
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ResultSetMetaData.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ResultSetMetaData.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ResultSetMetaData.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_ResultSetMetaData.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,132 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.sql.ResultSetMetaData;
+
+public class Impl_ResultSetMetaData implements ResultSetMetaData {
+
+	public Impl_ResultSetMetaData() {
+		super();
+	} // end constructor
+
+	public int getColumnCount() {
+
+		return 1906478379;
+	} // end method getColumnCount
+
+	public boolean isAutoIncrement(int parm1) {
+
+		return false;
+	} // end method isAutoIncrement
+
+	public boolean isCaseSensitive(int parm1) {
+
+		return false;
+	} // end method isCaseSensitive
+
+	public boolean isSearchable(int parm1) {
+
+		return false;
+	} // end method isSearchable
+
+	public boolean isCurrency(int parm1) {
+
+		return true;
+	} // end method isCurrency
+
+	public int isNullable(int parm1) {
+
+		return -2012354011;
+	} // end method isNullable
+
+	public boolean isSigned(int parm1) {
+
+		return false;
+	} // end method isSigned
+
+	public int getColumnDisplaySize(int parm1) {
+
+		return 464916191;
+	} // end method getColumnDisplaySize
+
+	public String getColumnLabel(int parm1) {
+
+		return null;
+	} // end method getColumnLabel
+
+	public String getColumnName(int parm1) {
+
+		return null;
+	} // end method getColumnName
+
+	public String getSchemaName(int parm1) {
+
+		return null;
+	} // end method getSchemaName
+
+	public int getPrecision(int parm1) {
+
+		return 1886638205;
+	} // end method getPrecision
+
+	public int getScale(int parm1) {
+
+		return 345387258;
+	} // end method getScale
+
+	public String getTableName(int parm1) {
+
+		return null;
+	} // end method getTableName
+
+	public String getCatalogName(int parm1) {
+
+		return null;
+	} // end method getCatalogName
+
+	public int getColumnType(int parm1) {
+
+		return -1629730083;
+	} // end method getColumnType
+
+	public String getColumnTypeName(int parm1) {
+
+		return null;
+	} // end method getColumnTypeName
+
+	public boolean isReadOnly(int parm1) {
+
+		return false;
+	} // end method isReadOnly
+
+	public boolean isWritable(int parm1) {
+
+		return true;
+	} // end method isWritable
+
+	public boolean isDefinitelyWritable(int parm1) {
+
+		return false;
+	} // end method isDefinitelyWritable
+
+	public String getColumnClassName(int parm1) {
+
+		return null;
+	} // end method getColumnClassName
+
+} // end class ResultSetMetaDataTest
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Statement.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Statement.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Statement.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/Impl_Statement.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,203 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLWarning;
+import java.sql.Statement;
+
+public class Impl_Statement implements Statement {
+
+	public Impl_Statement() {
+		super();
+	} // end constructor
+
+	public ResultSet executeQuery(String parm1) {
+
+		return null;
+	} // end method executeQuery
+
+	public int executeUpdate(String parm1) {
+
+		return -471239308;
+	} // end method executeUpdate
+
+	public void close() {
+
+	} // end method close
+
+	public int getMaxFieldSize() {
+
+		return 320138583;
+	} // end method getMaxFieldSize
+
+	public void setMaxFieldSize(int parm1) {
+
+	} // end method setMaxFieldSize
+
+	public int getMaxRows() {
+
+		return 1573292921;
+	} // end method getMaxRows
+
+	public void setMaxRows(int parm1) {
+
+	} // end method setMaxRows
+
+	public void setEscapeProcessing(boolean parm1) {
+
+	} // end method setEscapeProcessing
+
+	public int getQueryTimeout() {
+
+		return 488489018;
+	} // end method getQueryTimeout
+
+	public void setQueryTimeout(int parm1) {
+
+	} // end method setQueryTimeout
+
+	public void cancel() {
+
+	} // end method cancel
+
+	public SQLWarning getWarnings() {
+
+		return null;
+	} // end method getWarnings
+
+	public void clearWarnings() {
+
+	} // end method clearWarnings
+
+	public void setCursorName(String parm1) {
+
+	} // end method setCursorName
+
+	public boolean execute(String parm1) {
+
+		return false;
+	} // end method execute
+
+	public ResultSet getResultSet() {
+
+		return null;
+	} // end method getResultSet
+
+	public int getUpdateCount() {
+
+		return -1538600051;
+	} // end method getUpdateCount
+
+	public boolean getMoreResults() {
+
+		return true;
+	} // end method getMoreResults
+
+	public void setFetchDirection(int parm1) {
+
+	} // end method setFetchDirection
+
+	public int getFetchDirection() {
+
+		return -658236915;
+	} // end method getFetchDirection
+
+	public void setFetchSize(int parm1) {
+
+	} // end method setFetchSize
+
+	public int getFetchSize() {
+
+		return -1977059789;
+	} // end method getFetchSize
+
+	public int getResultSetConcurrency() {
+
+		return -593487597;
+	} // end method getResultSetConcurrency
+
+	public int getResultSetType() {
+
+		return 1701256610;
+	} // end method getResultSetType
+
+	public void addBatch(String parm1) {
+
+	} // end method addBatch
+
+	public void clearBatch() {
+
+	} // end method clearBatch
+
+	public int[] executeBatch() {
+
+		return null;
+	} // end method executeBatch
+
+	public Connection getConnection() {
+
+		return null;
+	} // end method getConnection
+
+	public boolean getMoreResults(int parm1) {
+
+		return true;
+	} // end method getMoreResults
+
+	public ResultSet getGeneratedKeys() {
+
+		return null;
+	} // end method getGeneratedKeys
+
+	public int executeUpdate(String parm1, int parm2) {
+
+		return 25207131;
+	} // end method executeUpdate
+
+	public int executeUpdate(String parm1, int[] parm2) {
+
+		return -299033331;
+	} // end method executeUpdate
+
+	public int executeUpdate(String parm1, String[] parm2) {
+
+		return -843663358;
+	} // end method executeUpdate
+
+	public boolean execute(String parm1, int parm2) {
+
+		return false;
+	} // end method execute
+
+	public boolean execute(String parm1, int[] parm2) {
+
+		return true;
+	} // end method execute
+
+	public boolean execute(String parm1, String[] parm2) {
+
+		return false;
+	} // end method execute
+
+	public int getResultSetHoldability() {
+
+		return -1288251923;
+	} // end method getResultSetHoldability
+
+} // end class StatementTest
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/ParameterMetaDataTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/ParameterMetaDataTest.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/ParameterMetaDataTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/ParameterMetaDataTest.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,92 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.HashMap;
+
+import junit.framework.TestCase;
+
+public class ParameterMetaDataTest extends TestCase {
+
+	/*
+	 * Public statics test
+	 */
+	public void testPublicStatics() {
+
+		HashMap thePublicStatics = new HashMap();
+		thePublicStatics.put("parameterModeOut", new Integer(4));
+		thePublicStatics.put("parameterModeInOut", new Integer(2));
+		thePublicStatics.put("parameterModeIn", new Integer(1));
+		thePublicStatics.put("parameterModeUnknown", new Integer(0));
+		thePublicStatics.put("parameterNullableUnknown", new Integer(2));
+		thePublicStatics.put("parameterNullable", new Integer(1));
+		thePublicStatics.put("parameterNoNulls", new Integer(0));
+
+		/*
+		 * System.out.println( "parameterModeOut: " +
+		 * ParameterMetaData.parameterModeOut ); System.out.println(
+		 * "parameterModeInOut: " + ParameterMetaData.parameterModeInOut );
+		 * System.out.println( "parameterModeIn: " +
+		 * ParameterMetaData.parameterModeIn ); System.out.println(
+		 * "parameterModeUnknown: " + ParameterMetaData.parameterModeUnknown );
+		 * System.out.println( "parameterNullableUnknown: " +
+		 * ParameterMetaData.parameterNullableUnknown ); System.out.println(
+		 * "parameterNullable: " + ParameterMetaData.parameterNullable );
+		 * System.out.println( "parameterNoNulls: " +
+		 * ParameterMetaData.parameterNoNulls );
+		 */
+
+		Class parameterMetaDataClass;
+		try {
+			parameterMetaDataClass = Class
+					.forName("java.sql.ParameterMetaData");
+		} catch (ClassNotFoundException e) {
+			fail("java.sql.ParameterMetaData class not found!");
+			return;
+		} // end try
+
+		Field[] theFields = parameterMetaDataClass.getDeclaredFields();
+		int requiredModifier = Modifier.PUBLIC + Modifier.STATIC
+				+ Modifier.FINAL;
+
+		int countPublicStatics = 0;
+		for (int i = 0; i < theFields.length; i++) {
+			String fieldName = theFields[i].getName();
+			int theMods = theFields[i].getModifiers();
+			if (Modifier.isPublic(theMods) && Modifier.isStatic(theMods)) {
+				try {
+					Object fieldValue = theFields[i].get(null);
+					Object expectedValue = thePublicStatics.get(fieldName);
+					if (expectedValue == null) {
+						fail("Field " + fieldName + " missing!");
+					} // end
+					assertEquals("Field " + fieldName + " value mismatch: ",
+							expectedValue, fieldValue);
+					assertEquals("Field " + fieldName + " modifier mismatch: ",
+							requiredModifier, theMods);
+					countPublicStatics++;
+				} catch (IllegalAccessException e) {
+					fail("Illegal access to Field " + fieldName);
+				} // end try
+			} // end if
+		} // end for
+
+	} // end method testPublicStatics
+
+} // end class ParameterMetaDataTest
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/ResultSetMetaDataTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/ResultSetMetaDataTest.java?rev=386087&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/ResultSetMetaDataTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/tests/api/java/sql/ResultSetMetaDataTest.java Wed Mar 15 06:55:38 2006
@@ -0,0 +1,82 @@
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed 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 tests.api.java.sql;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.HashMap;
+
+import junit.framework.TestCase;
+
+public class ResultSetMetaDataTest extends TestCase {
+
+	/*
+	 * Public statics test
+	 */
+	public void testPublicStatics() {
+
+		HashMap thePublicStatics = new HashMap();
+		thePublicStatics.put("columnNullableUnknown", new Integer(2));
+		thePublicStatics.put("columnNullable", new Integer(1));
+		thePublicStatics.put("columnNoNulls", new Integer(0));
+
+		/*
+		 * System.out.println( "columnNullableUnknown: " +
+		 * ResultSetMetaData.columnNullableUnknown ); System.out.println(
+		 * "columnNullable: " + ResultSetMetaData.columnNullable );
+		 * System.out.println( "columnNoNulls: " +
+		 * ResultSetMetaData.columnNoNulls );
+		 */
+
+		Class resultSetMetaDataClass;
+		try {
+			resultSetMetaDataClass = Class
+					.forName("java.sql.ResultSetMetaData");
+		} catch (ClassNotFoundException e) {
+			fail("java.sql.ResultSetMetaData class not found!");
+			return;
+		} // end try
+
+		Field[] theFields = resultSetMetaDataClass.getDeclaredFields();
+		int requiredModifier = Modifier.PUBLIC + Modifier.STATIC
+				+ Modifier.FINAL;
+
+		int countPublicStatics = 0;
+		for (int i = 0; i < theFields.length; i++) {
+			String fieldName = theFields[i].getName();
+			int theMods = theFields[i].getModifiers();
+			if (Modifier.isPublic(theMods) && Modifier.isStatic(theMods)) {
+				try {
+					Object fieldValue = theFields[i].get(null);
+					Object expectedValue = thePublicStatics.get(fieldName);
+					if (expectedValue == null) {
+						fail("Field " + fieldName + " missing!");
+					} // end
+					assertEquals("Field " + fieldName + " value mismatch: ",
+							expectedValue, fieldValue);
+					assertEquals("Field " + fieldName + " modifier mismatch: ",
+							requiredModifier, theMods);
+					countPublicStatics++;
+				} catch (IllegalAccessException e) {
+					fail("Illegal access to Field " + fieldName);
+				} // end try
+			} // end if
+		} // end for
+
+	} // end method testPublicStatics
+
+} // end class ResultSetMetaDataTest
+



Mime
View raw message