public final class UpdateXXXTest extends BaseJDBCTestCase
Modifier and Type | Field and Description |
---|---|
private static int |
COLUMNS |
private static java.lang.String |
SELECT_STMT |
private static java.lang.String |
TABLE_NAME |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
UpdateXXXTest(java.lang.String name)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private static BaseTestSuite |
baseSuite(java.lang.String name)
Base suite of tests that will run in both embedded and client.
|
private void |
checkColumnsAreNull()
Checks that the columns in the row are all SQL null.
|
private void |
checkColumnsAreUpdated()
Checks that the columns in the row are updated in the database.
|
void |
jdbc2testUpdateBigDecimal()
Tests calling update on all columns of the row.
|
void |
setUp()
The setup creates a Connection to the database, and also
creates a table with one row.
|
static junit.framework.Test |
suite()
Run in both embedded and client.
|
void |
testUpdateDouble()
Tests calling updateDouble on all columns of the row.
|
void |
testUpdateFloat()
Tests calling updateFloat on all columns of the row.
|
void |
testUpdateInt()
Tests calling updateInt on all columns of the row.
|
void |
testUpdateLong()
Tests calling updateLong on all columns of the row.
|
void |
testUpdateNull()
Tests calling setNull on all columns
|
void |
testUpdateObjectWithNull()
Tests calling updateObject with a null value on all columns.
|
void |
testUpdateShort()
Tests calling updateShort on all columns of the row.
|
void |
testUpdateString()
Tests calling updateString on all columns of the row.
|
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
private static final java.lang.String TABLE_NAME
private static final java.lang.String SELECT_STMT
private static final int COLUMNS
public UpdateXXXTest(java.lang.String name)
name
- name of testcase. Should be the name of test method.public static junit.framework.Test suite()
private static BaseTestSuite baseSuite(java.lang.String name)
name
- Name for the suite.public void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
- any exception will cause test to fail with error.public void testUpdateString() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.public void testUpdateInt() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.public void testUpdateLong() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.public void testUpdateShort() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.public void testUpdateFloat() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.public void testUpdateDouble() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.public void jdbc2testUpdateBigDecimal() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.public void testUpdateObjectWithNull() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.public void testUpdateNull() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.private void checkColumnsAreNull() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.private void checkColumnsAreUpdated() throws java.sql.SQLException
java.sql.SQLException
- database access error. Causes test to
fail with an error.Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.