public class ImportExportTest extends BaseJDBCTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
ImportExportTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
static junit.framework.Test |
baseSuite(java.lang.String name) |
private void |
doExport(java.lang.String fromSchema,
java.lang.String fromTable,
java.lang.String colDel,
java.lang.String charDel,
java.lang.String codeset) |
private void |
doExportToFile(java.lang.String fileName,
java.lang.String fromSchema,
java.lang.String fromTable,
java.lang.String colDel,
java.lang.String charDel,
java.lang.String codeset) |
private void |
doImport(java.lang.String fromTable,
java.lang.String toSchema,
java.lang.String toTable,
java.lang.String colDel,
java.lang.String charDel,
java.lang.String codeset,
int replace) |
private void |
doImportAndExport(java.lang.String fromSchema,
java.lang.String fromTable,
java.lang.String colDel,
java.lang.String charDel,
java.lang.String codeset) |
private void |
doImportAndVerify(java.lang.String fromSchema,
java.lang.String fromTable,
java.lang.String colDel,
java.lang.String charDel,
java.lang.String codeset,
int replace)
doImportAndVerify checks that data which has been imported and
then exported is identical.
|
private void |
doImportFromFile(java.lang.String fileName,
java.lang.String toSchema,
java.lang.String toTable,
java.lang.String colDel,
java.lang.String charDel,
java.lang.String codeset,
int replace) |
private void |
resetTables()
Called from
setUp() . |
protected void |
setUp()
Set up the test environment.
|
static junit.framework.Test |
suite() |
void |
testCastingProblem()
Test that you can't import the wrong type of object into a UDT column.
|
void |
testDelimiterAndCodeset() |
void |
testEarlyEndOfFile() |
void |
testEmptyTable() |
void |
testEmptyTableWithDelimitedFormat() |
void |
testEmptyTableWithFieldCharDelimiters() |
void |
testImportFromNonExistantFile() |
void |
testImportWithSameNameInDifferentSchema()
Test that import to a table in the default schema works if a table
with the same name exists in a different schema (DERBY-3296).
|
void |
testInvalidEncoding() |
void |
testNullDataFile() |
void |
testQuotesInArguments()
Test that quotes in the arguments to the export and import procedures
are handled properly (DERBY-4042).
|
void |
testQuotesInColumnNames()
Test that we can successfully export from and import to tables that
have columns with special characters in their names (single and double
quotes, spaces, mixed case).
|
void |
testSpecialDelimitersAndCodeset() |
void |
testSpecialDelimitersAndUTF16() |
void |
testWithCodeset() |
void |
testWithDefaultOptions() |
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, tearDown, 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 static junit.framework.Test suite()
public static junit.framework.Test baseSuite(java.lang.String name)
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
public void testImportFromNonExistantFile()
public void testNullDataFile()
public void testEmptyTable() throws java.sql.SQLException
java.sql.SQLException
public void testEmptyTableWithDelimitedFormat() throws java.sql.SQLException
java.sql.SQLException
public void testEmptyTableWithFieldCharDelimiters() throws java.sql.SQLException
java.sql.SQLException
public void testWithDefaultOptions() throws java.lang.Exception
java.lang.Exception
public void testWithCodeset() throws java.lang.Exception
java.lang.Exception
public void testDelimiterAndCodeset() throws java.lang.Exception
java.lang.Exception
public void testSpecialDelimitersAndCodeset() throws java.lang.Exception
java.lang.Exception
public void testSpecialDelimitersAndUTF16() throws java.lang.Exception
java.lang.Exception
public void testInvalidEncoding() throws java.lang.Exception
java.lang.Exception
public void testEarlyEndOfFile() throws java.lang.Exception
java.lang.Exception
public void testImportWithSameNameInDifferentSchema() throws java.lang.Exception
java.lang.Exception
public void testQuotesInArguments() throws java.lang.Exception
java.lang.Exception
public void testQuotesInColumnNames() throws java.lang.Exception
java.lang.Exception
public void testCastingProblem() throws java.lang.Exception
java.lang.Exception
private void doImport(java.lang.String fromTable, java.lang.String toSchema, java.lang.String toTable, java.lang.String colDel, java.lang.String charDel, java.lang.String codeset, int replace) throws java.sql.SQLException
java.sql.SQLException
private void doImportFromFile(java.lang.String fileName, java.lang.String toSchema, java.lang.String toTable, java.lang.String colDel, java.lang.String charDel, java.lang.String codeset, int replace) throws java.sql.SQLException
java.sql.SQLException
private void doImportAndExport(java.lang.String fromSchema, java.lang.String fromTable, java.lang.String colDel, java.lang.String charDel, java.lang.String codeset) throws java.sql.SQLException
java.sql.SQLException
private void doExport(java.lang.String fromSchema, java.lang.String fromTable, java.lang.String colDel, java.lang.String charDel, java.lang.String codeset) throws java.sql.SQLException
java.sql.SQLException
private void doExportToFile(java.lang.String fileName, java.lang.String fromSchema, java.lang.String fromTable, java.lang.String colDel, java.lang.String charDel, java.lang.String codeset) throws java.sql.SQLException
java.sql.SQLException
private void doImportAndVerify(java.lang.String fromSchema, java.lang.String fromTable, java.lang.String colDel, java.lang.String charDel, java.lang.String codeset, int replace) throws java.sql.SQLException
java.sql.SQLException
private void resetTables() throws java.lang.Exception
setUp()
.
Ensures that the import and export operate on a consistent
set of data.java.lang.Exception
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.