|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.derbyTesting.junit.BaseTestCase
org.apache.derbyTesting.junit.BaseJDBCTestCase
org.apache.derbyTesting.functionTests.tests.jdbcapi.UpdateXXXTest
public final class UpdateXXXTest
Tests updateXXX() methods on updatable resultsets. This is done by creating a table which has n columns with different SQL types. Then there is one testcase for each updateXXX method, which calls updateXXX on all columns.
| Field Summary | |
|---|---|
private static int |
COLUMNS
|
private static java.lang.String |
SELECT_STMT
|
private static java.lang.String |
TABLE_NAME
|
| Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE |
| Constructor Summary | |
|---|---|
UpdateXXXTest(java.lang.String name)
Constructor |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
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, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String TABLE_NAME
private static final java.lang.String SELECT_STMT
private static final int COLUMNS
| Constructor Detail |
|---|
public UpdateXXXTest(java.lang.String name)
name - name of testcase. Should be the name of test method.| Method Detail |
|---|
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.
|
Built on Sat 2009-11-28 18:44:18-0800, from revision 885187 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||