public class ForBitDataTest extends BaseJDBCTestCase
Modifier and Type | Field and Description |
---|---|
private static java.lang.String[] |
TABLES |
static java.lang.String[][] |
testCompareExpectedValues |
static java.lang.String[] |
testEncodedLengthsExpectedValues |
static java.lang.String[] |
testTypesExpectedValues |
static java.lang.String[] |
testTypesExpectedValues3 |
static java.lang.String[] |
testTypesExpectedValuesEmbedded |
static java.lang.String[] |
testTypesExpectedValuesNetworkServer |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
ForBitDataTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
protected static junit.framework.Test |
baseSuite(java.lang.String name) |
private java.lang.String |
checkEncodedLengthValue(java.lang.String col,
java.io.InputStream is,
int length,
int off) |
private void |
insertData(java.sql.PreparedStatement psI,
int id,
byte[] original,
int maxLen,
boolean streamAsWell) |
private void |
insertEL(java.sql.PreparedStatement psi,
java.sql.PreparedStatement pss,
java.sql.PreparedStatement psd,
int length,
java.lang.String expectedValue)
All the methods below this line are used by fixtures
|
private void |
selectData(java.sql.PreparedStatement pss,
byte[] data,
int off,
int length,
java.lang.String expectedValue) |
private void |
showCompareData(java.sql.PreparedStatement psS,
java.lang.String[] expectedValues) |
private java.lang.String |
showData(byte[] data) |
private void |
showData(java.sql.PreparedStatement psS,
int id,
byte[] original,
java.lang.String expectedValue) |
static junit.framework.Test |
suite()
Create a suite of tests.
|
void |
testCompare() |
void |
testEncodedLengths()
The length of a binary type is encoded when stored, this
test makes sure all the code paths are tested.
|
void |
testNegative()
Negative for bit data tests.
|
void |
testTypes()
FBD001,FBD007 - positive syntax
FBD004 - CHAR length defaults to one
FBD037 - create table
FBD006, FBD011, FBD014 - correct JDBC type
|
void |
testValues() |
assertCallError, assertCheckTable, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, 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, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, setUp, toString
private static java.lang.String[] TABLES
public static java.lang.String[] testTypesExpectedValues
public static java.lang.String[] testTypesExpectedValuesEmbedded
public static java.lang.String[] testTypesExpectedValuesNetworkServer
public static java.lang.String[] testTypesExpectedValues3
public static java.lang.String[][] testCompareExpectedValues
public static java.lang.String[] testEncodedLengthsExpectedValues
public void testNegative() throws java.sql.SQLException
java.sql.SQLException
public void testTypes() throws java.sql.SQLException
java.sql.SQLException
public void testValues() throws java.sql.SQLException
java.sql.SQLException
public void testCompare() throws java.sql.SQLException
java.sql.SQLException
public void testEncodedLengths() throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
public static junit.framework.Test suite()
protected static junit.framework.Test baseSuite(java.lang.String name)
private void insertEL(java.sql.PreparedStatement psi, java.sql.PreparedStatement pss, java.sql.PreparedStatement psd, int length, java.lang.String expectedValue) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
private void selectData(java.sql.PreparedStatement pss, byte[] data, int off, int length, java.lang.String expectedValue) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
private java.lang.String checkEncodedLengthValue(java.lang.String col, java.io.InputStream is, int length, int off) throws java.io.IOException
java.io.IOException
private void showCompareData(java.sql.PreparedStatement psS, java.lang.String[] expectedValues) throws java.sql.SQLException
java.sql.SQLException
private void insertData(java.sql.PreparedStatement psI, int id, byte[] original, int maxLen, boolean streamAsWell) throws java.sql.SQLException
java.sql.SQLException
private void showData(java.sql.PreparedStatement psS, int id, byte[] original, java.lang.String expectedValue) throws java.sql.SQLException
java.sql.SQLException
private java.lang.String showData(byte[] data)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.