|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.derbyTesting.junit.BaseTestCase
org.apache.derbyTesting.junit.BaseJDBCTestCase
org.apache.derbyTesting.functionTests.tests.jdbcapi.DriverTest
public class DriverTest
This test tests java.sql.Driver methods. Right now it just tests acceptsURL and some attributes Not tested in this test: - Tests for getPropertyInfo - tests for connection attributes
| Field Summary | |
|---|---|
(package private) static java.lang.String[] |
ADDITIONAL_DBS
Set of additional databases for tests that require a one-off database. |
private static java.lang.String |
DB_NAME_WITH_SPACES
|
| Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE |
| Constructor Summary | |
|---|---|
DriverTest(java.lang.String name)
|
|
| Method Summary | |
|---|---|
private static void |
assertConnect(boolean expectUrlEqualsGetUrl,
java.lang.String url,
java.util.Properties info)
Do java.sql.Driver.connect(String url, Properties info call) |
private static void |
assertTraceFilesExist()
Check that trace files exist |
private static junit.framework.Test |
baseSuite(java.lang.String name)
|
private static void |
loadDriver()
Load the appropriate driver for the current framework |
private static void |
setBaseProps(junit.framework.TestSuite suite,
junit.framework.Test test)
|
private static void |
shutdownDB(java.lang.String url,
java.util.Properties info)
use this method to shutdown databases in an effort to release any locks they may be holding |
static junit.framework.Test |
suite()
|
void |
tearDown()
Tear down this fixture, sub-classes should call super.tearDown(). |
void |
testAcceptsURL()
Check that drivers accept the correct urls and reject those for other supported drivers. |
void |
testClientAttributes()
Tests that client side attributes cann be specified in either url or as info argument to connect. |
void |
testClientURL()
Tests client URLs to see connection is successful or the correct exception is thrown. |
void |
testDbNameWithSpaces()
Tests URL with spaces in database name to check create and connect works. |
void |
testDriverCompliantVersion()
Load the driver and check java.sql.Driver.jdbcCompliant() and driver.get*Version |
void |
testEmbeddedAttributes()
Tests that embedded attributes can be specified in either url or info argument to connect DERBY-530. |
| Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runTest, setName, setUp, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static java.lang.String DB_NAME_WITH_SPACES
static final java.lang.String[] ADDITIONAL_DBS
| Constructor Detail |
|---|
public DriverTest(java.lang.String name)
| Method Detail |
|---|
public static junit.framework.Test suite()
private static junit.framework.Test baseSuite(java.lang.String name)
private static void setBaseProps(junit.framework.TestSuite suite,
junit.framework.Test test)
public void tearDown()
throws java.lang.Exception
BaseJDBCTestCase
tearDown in class BaseJDBCTestCasejava.lang.Exception
public void testDriverCompliantVersion()
throws java.lang.Exception
java.lang.Exception
public void testAcceptsURL()
throws java.sql.SQLException,
java.lang.Exception
SQLException, - Exception
java.sql.SQLException
java.lang.Exception
public void testEmbeddedAttributes()
throws java.sql.SQLException
java.sql.SQLException
public void testClientAttributes()
throws java.sql.SQLException
java.sql.SQLExceptionprivate static void assertTraceFilesExist()
public void testClientURL()
throws java.sql.SQLException
java.sql.SQLException
public void testDbNameWithSpaces()
throws java.sql.SQLException
java.sql.SQLException
private static void assertConnect(boolean expectUrlEqualsGetUrl,
java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException
expectUrlEqualsGetUrl - boolean indicating embedded would
expect the url passed in to equal metadata.getURL()url - url to pass to Driver.connect()info - properties to pass to Driver.Connect()
java.sql.SQLException - on error.
private static void shutdownDB(java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException
java.sql.SQLExceptionprivate static void loadDriver()
|
Built on Thu 2009-11-26 18:42:53-0800, from revision 884739 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||