|
|||||||||
| 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.UpdatableResultSetTest
public class UpdatableResultSetTest
Tests updatable result sets. DERBY-1767 - Test that the deleteRow, insertRow and updateRow methods with column/table/schema/cursor names containing quotes.
| Field Summary | |
|---|---|
private static byte[] |
BYTES1
|
private static byte[] |
BYTES2
|
private static int |
insertKey
Key used to identify inserted rows. |
private int |
key
|
| Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE |
| Constructor Summary | |
|---|---|
UpdatableResultSetTest(java.lang.String name)
Creates a new instance of UpdatableResultSetTest |
|
| Method Summary | |
|---|---|
private java.sql.ResultSet |
fetch(java.lang.String colName,
int key)
Fetch the specified row. |
private java.sql.ResultSet |
fetchUpd(java.lang.String colName,
int key)
Fetch the specified row for update. |
private java.sql.PreparedStatement |
prep(java.lang.String colName)
Prepare commonly used statement to insert a row. |
private static int |
requestKey()
Get a key that is used to identify an inserted row. |
protected void |
setUp()
Create require objects and data. |
static junit.framework.Test |
suite()
Create a test suite with all tests in this class. |
void |
testDeleteRowOnQuotedColumn()
Tests deleteRow with column name containing quotes |
void |
testDeleteRowOnQuotedCursor()
Tests deleteRow with cursor name containing quotes |
void |
testDeleteRowOnQuotedSchema()
Tests deleteRow with schema name containing quotes |
void |
testDeleteRowOnQuotedTable()
Tests deleteRow with table name containing quotes |
void |
testInsertRowOnQuotedColumn()
Tests insertRow with column name containing quotes |
void |
testInsertRowOnQuotedCursor()
Tests insertRow with cursor name containing quotes |
void |
testInsertRowOnQuotedSchema()
Tests insertRow with schema name containing quotes |
void |
testInsertRowOnQuotedTable()
Tests insertRow with table name containing quotes |
void |
testUpdateBlob()
This methods tests the ResultSet interface method updateBlob |
void |
testUpdateBlobStringParameterName()
This methods tests the ResultSet interface method updateBlob |
void |
testUpdateClob()
This methods tests the ResultSet interface method updateClob |
void |
testUpdateClobStringParameterName()
This methods tests the ResultSet interface method updateClob |
void |
testUpdateRowOnQuotedColumn()
Tests updateRow with column name containing quotes |
void |
testUpdateRowOnQuotedCursor()
Tests updateRow with cursor name containing quotes |
void |
testUpdateRowOnQuotedSchema()
Tests updateRow with schema name containing quotes |
void |
testUpdateRowOnQuotedTable()
Tests updateRow with table name containing quotes |
| 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 byte[] BYTES1
private static final byte[] BYTES2
private static int insertKey
requestKey to obtain it.
private int key
| Constructor Detail |
|---|
public UpdatableResultSetTest(java.lang.String name)
| Method Detail |
|---|
protected void setUp()
throws java.sql.SQLException
setUp in class junit.framework.TestCasejava.sql.SQLExceptionpublic static junit.framework.Test suite()
public void testInsertRowOnQuotedTable()
throws java.sql.SQLException
java.sql.SQLException
public void testUpdateRowOnQuotedTable()
throws java.sql.SQLException
java.sql.SQLException
public void testDeleteRowOnQuotedTable()
throws java.sql.SQLException
java.sql.SQLException
public void testInsertRowOnQuotedColumn()
throws java.sql.SQLException
java.sql.SQLException
public void testUpdateRowOnQuotedColumn()
throws java.sql.SQLException
java.sql.SQLException
public void testDeleteRowOnQuotedColumn()
throws java.sql.SQLException
java.sql.SQLException
public void testInsertRowOnQuotedSchema()
throws java.sql.SQLException
java.sql.SQLException
public void testUpdateRowOnQuotedSchema()
throws java.sql.SQLException
java.sql.SQLException
public void testDeleteRowOnQuotedSchema()
throws java.sql.SQLException
java.sql.SQLException
public void testInsertRowOnQuotedCursor()
throws java.sql.SQLException
java.sql.SQLException
public void testUpdateRowOnQuotedCursor()
throws java.sql.SQLException
java.sql.SQLException
public void testDeleteRowOnQuotedCursor()
throws java.sql.SQLException
java.sql.SQLException
public void testUpdateBlob()
throws java.lang.Exception
java.lang.Exception
public void testUpdateBlobStringParameterName()
throws java.lang.Exception
java.lang.Exception
public void testUpdateClob()
throws java.lang.Exception
java.lang.Exception
public void testUpdateClobStringParameterName()
throws java.lang.Exception
java.lang.Exceptionprivate static final int requestKey()
private java.sql.PreparedStatement prep(java.lang.String colName)
throws java.sql.SQLException
colName - name of the column to insert into
java.sql.SQLException
private java.sql.ResultSet fetchUpd(java.lang.String colName,
int key)
throws java.sql.SQLException
colName - name of the column to fetchkey - identifier for row to fetch
ResultSet with zero or one row, depending on
the key used
java.sql.SQLException
private java.sql.ResultSet fetch(java.lang.String colName,
int key)
throws java.sql.SQLException
colName - name of the column to fetchkey - identifier for row to fetch
ResultSet with zero or one row, depending on
the key used
java.sql.SQLException
|
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 | ||||||||