public class DataSourceTest extends BaseJDBCTestCase
javax.sql.DataSource
JDBC40 API.Modifier and Type | Field and Description |
---|---|
private javax.sql.DataSource |
ds |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
DataSourceTest(java.lang.String name)
Create a test with the given name.
|
Modifier and Type | Method and Description |
---|---|
void |
setUp()
Create a default DataSource
|
static junit.framework.Test |
suite()
Return suite with all tests of the class.
|
void |
tearDown()
Initialize the ds to null once the tests that need to be run have been
run
|
void |
test_jdbc4_1()
Test the new method added by JDBC 4.1.
|
void |
testConnectionErrorEvent()
Test case for DERBY-3172
When the Derby engine is shutdown or Network Server is brought down, any
api on JDBC Connection object should generate a Connection error event.
|
void |
testIsNotWrapperForPoolDataSource() |
void |
testIsNotWrapperForResultSet() |
void |
testIsNotWrapperForXADataSource() |
void |
testIsWrapperForDataSource() |
void |
testUnwrapConnectionPoolDataSource() |
void |
testUnwrapDataSource() |
void |
testUnwrapResultSet() |
void |
testUnwrapXADataSource() |
private void |
vetDSjdbc4_1(javax.sql.CommonDataSource cds) |
assertCallError, assertCheckTable, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toString
public DataSourceTest(java.lang.String name)
name
- name of the test.public void setUp()
setUp
in class junit.framework.TestCase
public void tearDown() throws java.lang.Exception
tearDown
in class BaseJDBCTestCase
java.lang.Exception
public void testIsWrapperForDataSource() throws java.sql.SQLException
java.sql.SQLException
public void testIsNotWrapperForPoolDataSource() throws java.sql.SQLException
java.sql.SQLException
public void testIsNotWrapperForXADataSource() throws java.sql.SQLException
java.sql.SQLException
public void testIsNotWrapperForResultSet() throws java.sql.SQLException
java.sql.SQLException
public void testUnwrapDataSource() throws java.sql.SQLException
java.sql.SQLException
public void testUnwrapConnectionPoolDataSource()
public void testUnwrapXADataSource()
public void testUnwrapResultSet()
public void testConnectionErrorEvent() throws java.sql.SQLException, java.lang.Exception
java.sql.SQLException
java.lang.Exception
public void test_jdbc4_1() throws java.lang.Exception
Test the new method added by JDBC 4.1.
java.lang.Exception
private void vetDSjdbc4_1(javax.sql.CommonDataSource cds) throws java.lang.Exception
java.lang.Exception
public static junit.framework.Test suite()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.