public abstract class ScriptTestCase extends CanonTestCase
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
inputEncoding |
private java.util.Locale |
oldLocale |
private java.lang.String |
user |
private boolean |
useSystemProperties |
DEFAULT_ENCODING, outputEncodingDEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
ScriptTestCase(java.lang.String script)
Create a ScriptTestCase to run a single test
using a connection obtained from getConnection()
|
ScriptTestCase(java.lang.String script,
boolean useSystemProperties)
Create a ScriptTestCase to run a single test
using a connection obtained from getConnection()
|
ScriptTestCase(java.lang.String script,
java.lang.String encoding)
Create a ScriptTestCase to run a single test
using a connection obtained from getConnection() with a
different encoding
|
ScriptTestCase(java.lang.String script,
java.lang.String inputEnc,
java.lang.String outputEnc,
java.lang.String user)
Create a ScriptTestCase to run a single test
using a connection obtained from getConnection() with a
different encoding.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getArea()
Return the folder (last element of the package) where
the .sql script lives, e.g. lang.
|
static junit.framework.Test |
getIJConfig(junit.framework.Test test)
Get a decorator to setup the ij in order
to run the test.
|
void |
runTest()
Run the test, using the resource as the input.
|
protected void |
setUp()
Set up the new locale for the test
|
protected void |
tearDown()
Revert the locale back to the old one
|
compareCanon, getOutputStreamassertCallError, 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, setName, toStringprivate final java.lang.String inputEncoding
private final java.lang.String user
private boolean useSystemProperties
private java.util.Locale oldLocale
public ScriptTestCase(java.lang.String script,
boolean useSystemProperties)
script - Base name of the .sql scriptuseSystemProperties - Whether to use system properties for this test
excluding the .sql suffix.public ScriptTestCase(java.lang.String script)
script - Base name of the .sql script
excluding the .sql suffix.public ScriptTestCase(java.lang.String script,
java.lang.String encoding)
script - Base name of the .sql script
excluding the .sql suffix.public ScriptTestCase(java.lang.String script,
java.lang.String inputEnc,
java.lang.String outputEnc,
java.lang.String user)
script - Base name of the .sql script
excluding the .sql suffix.inputEnc - The encoding for the script, if not null,
else use "US-ASCII"outputEnc - The encoding for the ouput from the script,
if not null, else use "US-ASCII"user - Run script as userprotected java.lang.String getArea()
public static junit.framework.Test getIJConfig(junit.framework.Test test)
public void runTest()
throws java.lang.Throwable
runTest in class junit.framework.TestCasejava.lang.Throwableprotected void setUp()
setUp in class junit.framework.TestCaseprotected void tearDown()
throws java.lang.Exception
tearDown in class BaseJDBCTestCasejava.lang.ExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.