|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.derbyTesting.junit.BaseTestCase
org.apache.derbyTesting.junit.BaseJDBCTestCase
org.apache.derbyTesting.functionTests.tests.jdbcapi.CharacterStreamsTest
public class CharacterStreamsTest
Tests the following PreparedStatement methods: -> setCharacterStream(int parameterIndex, InputStream x, int length) -> setAsciiStream(int parameterIndex, Reader reader, int length)
| Field Summary | |
|---|---|
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
|
| Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE |
| Constructor Summary | |
|---|---|
CharacterStreamsTest(java.lang.String name)
Creates a new instance of CharacterStreamsTest |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase |
|---|
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runTest, setName, 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 |
|---|
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
| Constructor Detail |
|---|
public CharacterStreamsTest(java.lang.String name)
| Method Detail |
|---|
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.TestCasejava.lang.Exception
protected void tearDown()
throws java.lang.Exception
BaseJDBCTestCase
tearDown in class BaseJDBCTestCasejava.lang.Exception
|
Built on Wed 2009-11-25 18:43:31-0800, from revision 884373 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||