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 junit.framework.TestSuite |
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, 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, tearDown, 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, toStringprivate 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 junit.framework.TestSuite baseSuite(java.lang.String name)
name - Name for the suite.public void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.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.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.