|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.extensions.TestDecorator
junit.extensions.TestSetup
org.apache.derbyTesting.junit.BaseTestSetup
org.apache.derbyTesting.junit.BaseJDBCTestSetup
org.apache.derbyTesting.functionTests.tests.jdbc4.BlobClobTestSetup
public class BlobClobTestSetup
Create a table with one column for a blob and one column for a clob. This is shared between tests that need a blob or a clob, and is required because the createBlob/-Clob methods are not yet implemented.
| Field Summary | |
|---|---|
private static byte[] |
blobData
Blob data. |
private static java.lang.String |
clobData
Clob data. |
static int |
ID
ID is used to store the latest unique value for the ID column Start from 3 since 1 is used for null values and 2 is used for sample values. |
static int |
ID_NULLVALUES
Constant for accessing the row with null values. |
static int |
ID_SAMPLEVALUES
Constant for accessing the row with sample values. |
| Fields inherited from class junit.extensions.TestDecorator |
|---|
fTest |
| Constructor Summary | |
|---|---|
BlobClobTestSetup(junit.framework.Test test)
Create a test setup for the specified blob or clob test. |
|
| Method Summary | |
|---|---|
static int |
getID()
Returns new unique ID values that can be used in these tests. |
static java.sql.Blob |
getSampleBlob(java.sql.Connection con)
Fetch a sample Blob. |
static java.sql.Clob |
getSampleClob(java.sql.Connection con)
Fetch a sample Clob. |
protected void |
setUp()
Create a table with BLOB and CLOB, so that such objects can be accessed/used from JDBC. |
protected void |
tearDown()
Drop the table we created during setup. |
| Methods inherited from class org.apache.derbyTesting.junit.BaseJDBCTestSetup |
|---|
getConnection, getTestConfiguration, println |
| Methods inherited from class org.apache.derbyTesting.junit.BaseTestSetup |
|---|
run |
| Methods inherited from class junit.extensions.TestDecorator |
|---|
basicRun, countTestCases, getTest, 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 |
|---|
public static final int ID_NULLVALUES
public static final int ID_SAMPLEVALUES
public static int ID
private static final byte[] blobData
private static final java.lang.String clobData
| Constructor Detail |
|---|
public BlobClobTestSetup(junit.framework.Test test)
test - the test to provide setup for.| Method Detail |
|---|
protected void setUp()
throws java.io.IOException,
java.sql.SQLException
setUp in class junit.extensions.TestSetupjava.io.IOException
java.sql.SQLException
protected void tearDown()
throws java.lang.Exception
tearDown in class BaseJDBCTestSetupjava.lang.Exception
public static java.sql.Blob getSampleBlob(java.sql.Connection con)
throws java.sql.SQLException
con - database connection to fetch data from.
Blob object.
java.sql.SQLException
public static java.sql.Clob getSampleClob(java.sql.Connection con)
throws java.sql.SQLException
con - database connection to fetch data from.
Clob object.
java.sql.SQLExceptionpublic static int getID()
|
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 | ||||||||