public class CallableStatementTestSetup extends BaseJDBCTestSetup
Modifier and Type | Field and Description |
---|---|
private static java.lang.String[] |
FUNCTION_DROPS
List of functions to drop on tear-down.
|
private static java.lang.String[] |
PROCEDURE_DROPS
List of procedures to drop on tear-down.
|
private static java.lang.String |
SOURCECLASS |
static int |
SQL_NULL_ID
Id for row with SQL NULL values.
|
static java.lang.String |
STRING_BYTES
String converted to bytes in UTF-16BE representation.
|
static int |
STRING_BYTES_ID
Id for row with byte representation of a string.
|
private static java.lang.String[] |
TABLE_DROPS
List of tables to drop on tear-down
|
Constructor and Description |
---|
CallableStatementTestSetup(junit.framework.Test test)
Create a new test setup for the CallableStatementTest.
|
Modifier and Type | Method and Description |
---|---|
static void |
getBinaryDirect(java.lang.String inputString,
byte[][] outputByte)
Procedure creating a byte representation of a string.
|
static java.sql.CallableStatement |
getBinaryDirectProcedure(java.sql.Connection con)
Return statement for calling procedure that converts a string to a
byte array (UTF-16BE charset).
|
static byte[] |
getBinaryFromDb(int id)
Function fetching binary data from the database.
|
static java.sql.CallableStatement |
getBinaryFromDbFunction(java.sql.Connection con)
Return statement for calling getBinaryFromDb function.
|
static java.sql.CallableStatement |
getIntToStringFunction(java.sql.Connection con)
Return function converting an integer to a string.
|
static java.lang.String |
getVarcharFromDb(int id)
Function fetching character data from the database.
|
static java.sql.CallableStatement |
getVarcharFromDbFunction(java.sql.Connection con)
Return statement for calling getVarcharFromDb function.
|
protected void |
setUp() |
protected void |
tearDown()
Tear down this fixture, sub-classes should call
super.tearDown().
|
getConnection, getTestConfiguration, println
run
basicRun, countTestCases, getTest, toString
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, failNotEquals, failNotSame, failSame, format
private static final java.lang.String SOURCECLASS
private static final java.lang.String[] TABLE_DROPS
private static final java.lang.String[] FUNCTION_DROPS
private static final java.lang.String[] PROCEDURE_DROPS
public static final int STRING_BYTES_ID
public static final java.lang.String STRING_BYTES
public static final int SQL_NULL_ID
public CallableStatementTestSetup(junit.framework.Test test)
test
- the test/suite to provide setup for.protected void setUp() throws java.sql.SQLException
setUp
in class junit.extensions.TestSetup
java.sql.SQLException
protected void tearDown() throws java.lang.Exception
BaseJDBCTestSetup
tearDown
in class BaseJDBCTestSetup
java.lang.Exception
public static java.sql.CallableStatement getIntToStringFunction(java.sql.Connection con) throws java.sql.SQLException
java.sql.SQLException
public static java.sql.CallableStatement getBinaryDirectProcedure(java.sql.Connection con) throws java.sql.SQLException
java.sql.SQLException
public static java.sql.CallableStatement getBinaryFromDbFunction(java.sql.Connection con) throws java.sql.SQLException
con
- database connection.java.sql.SQLException
public static java.sql.CallableStatement getVarcharFromDbFunction(java.sql.Connection con) throws java.sql.SQLException
con
- database connection.java.sql.SQLException
public static void getBinaryDirect(java.lang.String inputString, byte[][] outputByte)
inputString
- a string.outputByte
- string returned as UTF-16BE byte representation.public static byte[] getBinaryFromDb(int id) throws java.lang.Exception
id
- id of row to fetch.java.lang.Exception
public static java.lang.String getVarcharFromDb(int id) throws java.lang.Exception
id
- id of row to fetch.java.lang.Exception
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.