public class DriverTest extends BaseJDBCTestCase
| Modifier and Type | Field and Description |
|---|---|
(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 |
private static java.lang.String |
MALFORMED_URL |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
DriverTest(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
assertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, emptyStatementCache, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbeddedalarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemProperty, sleep, sleepAtLeastOneTick, traceitassertEquals, 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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, setUp, toStringprivate static final java.lang.String DB_NAME_WITH_SPACES
private static final java.lang.String MALFORMED_URL
static final java.lang.String[] ADDITIONAL_DBS
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
BaseJDBCTestCasetearDown in class BaseJDBCTestCasejava.lang.Exceptionpublic void testDriverCompliantVersion()
throws java.lang.Exception
java.lang.Exceptionpublic void testAcceptsURL()
throws java.sql.SQLException,
java.lang.Exception
SQLException, - Exceptionjava.sql.SQLExceptionjava.lang.Exceptionpublic void testEmbeddedAttributes()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testClientAttributes()
throws java.sql.SQLException
java.sql.SQLExceptionprivate static void assertTraceFilesExist()
public void testClientURL()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDbNameWithSpaces()
throws java.sql.SQLException
java.sql.SQLExceptionprivate 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()
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.