public class CharacterStreamsTest extends BaseJDBCTestCase
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ASCII_VALUE |
private static java.lang.String |
CHAR_VALUE1 |
private static java.lang.String |
CHAR_VALUE2 |
private static int |
LEN_ASCII_VALUE |
private static int |
LEN_CHAR_VALUE1 |
private static int |
LEN_CHAR_VALUE2 |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
CharacterStreamsTest(java.lang.String name)
Creates a new instance of CharacterStreamsTest
|
Modifier and Type | Method and Description |
---|---|
private void |
checkAsciiStream(java.io.InputStream is,
int length,
int fixedLen) |
private void |
checkAsciiStream(java.io.Reader r,
int length,
int fixedLen) |
private void |
checkAsciiStreams(java.sql.PreparedStatement psDel,
java.sql.PreparedStatement psi,
java.sql.PreparedStatement psq2,
int cl,
int vcl,
int lvcl,
int lob) |
private void |
checkCharacterStreams(java.sql.PreparedStatement psDel,
java.sql.PreparedStatement psi,
java.sql.PreparedStatement psq2,
java.sql.PreparedStatement psqSQLLength,
int cl,
int vcl,
int lvcl,
int lob,
int bytesPerChar) |
private void |
checkCharStream(java.io.InputStream is,
int length,
int fixedLen,
int bytesPerChar) |
private void |
checkCharStream(java.io.Reader r,
int length,
int fixedLen,
int bytesPerChar) |
private int |
getMaxId() |
private java.io.Reader |
getSourceStream(int length,
int bytesPerChar) |
private void |
runTestSetAsciiStream(int col) |
private void |
runTestSetAsciiStreamLongValues() |
private void |
runTestSetCharacterStream(int col) |
private void |
runTestSetCharacterStreamLongValues() |
private void |
setAscii(java.sql.PreparedStatement ps,
int targetCol) |
private void |
setCharacter(java.sql.PreparedStatement ps,
int targetCol) |
protected void |
setUp() |
static junit.framework.Test |
suite() |
protected void |
tearDown()
Tear down this fixture, sub-classes should call
super.tearDown().
|
void |
testSetAsciiStreamIntoChar()
Test PreparedStatement.setAsciiStream() with column of type CHAR
|
void |
testSetAsciiStreamIntoClob()
Test PreparedStatement.setAsciiStream() with column of type CLOB
|
void |
testSetAsciiStreamIntoLongVarchar()
Test PreparedStatement.setAsciiStream() with column of type LONG VARCHAR
|
void |
testSetAsciiStreamIntoVarchar()
Test PreparedStatement.setAsciiStream() with column of type VARCHAR
|
void |
testSetAsciiStreamLongValues()
Test PreparedStatement.setAsciiStream() with streams with sizes from
60characters to 32K characters
|
void |
testSetCharacterStreamIntoChar()
Test PreparedStatement.setCharacterStream() with column of type CHAR
|
void |
testSetCharacterStreamIntoClob()
Test PreparedStatement.setCharacterStream() with column of type CLOB
|
void |
testSetCharacterStreamIntoLongVarchar()
Test PreparedStatement.setCharacterStream() with column of type
LONG VARCHAR
|
void |
testSetCharacterStreamIntoVarchar()
Test PreparedStatement.setCharacterStream() with column of type VARCHAR
|
void |
testSetCharacterStreamLongValues()
Test PreparedStatement.setCharacterStream() with streams with sizes from
60 characters to 32K characters
|
private void |
verifyAsciiStreamResults(java.sql.ResultSet rs,
int col) |
private void |
verifyCharStreamResults(java.sql.ResultSet rs,
int col) |
private void |
verifyResultsUsingAsciiStream(java.sql.ResultSet rs,
int col) |
private void |
verifyResultsUsingCharacterStream(java.sql.ResultSet rs,
int col) |
private void |
verifyResultsUsingCharacterStreamBlock(java.sql.ResultSet rs,
int col) |
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, 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, toString
private static final java.lang.String ASCII_VALUE
private static final int LEN_ASCII_VALUE
private static final java.lang.String CHAR_VALUE1
private static final int LEN_CHAR_VALUE1
private static final java.lang.String CHAR_VALUE2
private static final int LEN_CHAR_VALUE2
public CharacterStreamsTest(java.lang.String name)
public static junit.framework.Test suite()
public void testSetAsciiStreamIntoChar() throws java.lang.Exception
java.lang.Exception
public void testSetAsciiStreamIntoVarchar() throws java.lang.Exception
java.lang.Exception
public void testSetAsciiStreamIntoLongVarchar() throws java.lang.Exception
java.lang.Exception
public void testSetAsciiStreamIntoClob() throws java.lang.Exception
java.lang.Exception
public void testSetCharacterStreamIntoChar() throws java.lang.Exception
java.lang.Exception
public void testSetCharacterStreamIntoVarchar() throws java.lang.Exception
java.lang.Exception
public void testSetCharacterStreamIntoLongVarchar() throws java.lang.Exception
java.lang.Exception
public void testSetCharacterStreamIntoClob() throws java.lang.Exception
java.lang.Exception
public void testSetAsciiStreamLongValues() throws java.lang.Exception
java.lang.Exception
public void testSetCharacterStreamLongValues() throws java.lang.Exception
java.lang.Exception
private void runTestSetAsciiStream(int col) throws java.lang.Exception
java.lang.Exception
private void runTestSetCharacterStream(int col) throws java.lang.Exception
java.lang.Exception
private void runTestSetAsciiStreamLongValues() throws java.lang.Exception
java.lang.Exception
private void runTestSetCharacterStreamLongValues() throws java.lang.Exception
java.lang.Exception
private int getMaxId() throws java.sql.SQLException
java.sql.SQLException
private void setAscii(java.sql.PreparedStatement ps, int targetCol) throws java.lang.Exception
java.lang.Exception
private void setCharacter(java.sql.PreparedStatement ps, int targetCol) throws java.lang.Exception
java.lang.Exception
private void verifyAsciiStreamResults(java.sql.ResultSet rs, int col) throws java.lang.Exception
java.lang.Exception
private void verifyCharStreamResults(java.sql.ResultSet rs, int col) throws java.lang.Exception
java.lang.Exception
private void verifyResultsUsingAsciiStream(java.sql.ResultSet rs, int col) throws java.lang.Exception
java.lang.Exception
private void verifyResultsUsingCharacterStream(java.sql.ResultSet rs, int col) throws java.lang.Exception
java.lang.Exception
private void verifyResultsUsingCharacterStreamBlock(java.sql.ResultSet rs, int col) throws java.lang.Exception
java.lang.Exception
private void checkAsciiStreams(java.sql.PreparedStatement psDel, java.sql.PreparedStatement psi, java.sql.PreparedStatement psq2, int cl, int vcl, int lvcl, int lob) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
private java.io.Reader getSourceStream(int length, int bytesPerChar)
private void checkCharacterStreams(java.sql.PreparedStatement psDel, java.sql.PreparedStatement psi, java.sql.PreparedStatement psq2, java.sql.PreparedStatement psqSQLLength, int cl, int vcl, int lvcl, int lob, int bytesPerChar) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
private void checkAsciiStream(java.io.InputStream is, int length, int fixedLen) throws java.io.IOException
java.io.IOException
private void checkAsciiStream(java.io.Reader r, int length, int fixedLen) throws java.io.IOException
java.io.IOException
private void checkCharStream(java.io.InputStream is, int length, int fixedLen, int bytesPerChar) throws java.io.IOException
java.io.IOException
private void checkCharStream(java.io.Reader r, int length, int fixedLen, int bytesPerChar) throws java.io.IOException
java.io.IOException
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
protected void tearDown() throws java.lang.Exception
BaseJDBCTestCase
tearDown
in class BaseJDBCTestCase
java.lang.Exception
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.