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, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, emptyStatementCache, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, usingDB2Client, usingDerbyNetClient, usingEmbeddedalarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemProperty, sleep, sleepAtLeastOneTick, traceitassertEquals, 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, toStringprivate 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.Exceptionpublic void testSetAsciiStreamIntoVarchar()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetAsciiStreamIntoLongVarchar()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetAsciiStreamIntoClob()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetCharacterStreamIntoChar()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetCharacterStreamIntoVarchar()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetCharacterStreamIntoLongVarchar()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetCharacterStreamIntoClob()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetAsciiStreamLongValues()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetCharacterStreamLongValues()
throws java.lang.Exception
java.lang.Exceptionprivate void runTestSetAsciiStream(int col)
throws java.lang.Exception
java.lang.Exceptionprivate void runTestSetCharacterStream(int col)
throws java.lang.Exception
java.lang.Exceptionprivate void runTestSetAsciiStreamLongValues()
throws java.lang.Exception
java.lang.Exceptionprivate void runTestSetCharacterStreamLongValues()
throws java.lang.Exception
java.lang.Exceptionprivate int getMaxId()
throws java.sql.SQLException
java.sql.SQLExceptionprivate void setAscii(java.sql.PreparedStatement ps,
int targetCol)
throws java.lang.Exception
java.lang.Exceptionprivate void setCharacter(java.sql.PreparedStatement ps,
int targetCol)
throws java.lang.Exception
java.lang.Exceptionprivate void verifyAsciiStreamResults(java.sql.ResultSet rs,
int col)
throws java.lang.Exception
java.lang.Exceptionprivate void verifyCharStreamResults(java.sql.ResultSet rs,
int col)
throws java.lang.Exception
java.lang.Exceptionprivate void verifyResultsUsingAsciiStream(java.sql.ResultSet rs,
int col)
throws java.lang.Exception
java.lang.Exceptionprivate void verifyResultsUsingCharacterStream(java.sql.ResultSet rs,
int col)
throws java.lang.Exception
java.lang.Exceptionprivate void verifyResultsUsingCharacterStreamBlock(java.sql.ResultSet rs,
int col)
throws java.lang.Exception
java.lang.Exceptionprivate 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.SQLExceptionjava.io.IOExceptionprivate 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.SQLExceptionjava.io.IOExceptionprivate void checkAsciiStream(java.io.InputStream is,
int length,
int fixedLen)
throws java.io.IOException
java.io.IOExceptionprivate void checkAsciiStream(java.io.Reader r,
int length,
int fixedLen)
throws java.io.IOException
java.io.IOExceptionprivate void checkCharStream(java.io.InputStream is,
int length,
int fixedLen,
int bytesPerChar)
throws java.io.IOException
java.io.IOExceptionprivate void checkCharStream(java.io.Reader r,
int length,
int fixedLen,
int bytesPerChar)
throws java.io.IOException
java.io.IOExceptionprotected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.Exceptionprotected void tearDown()
throws java.lang.Exception
BaseJDBCTestCasetearDown in class BaseJDBCTestCasejava.lang.ExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.