org.apache.derbyTesting.functionTests.tests.jdbcapi
Class LobStreamsTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.derbyTesting.junit.BaseTestCase
              extended by org.apache.derbyTesting.junit.BaseJDBCTestCase
                  extended by org.apache.derbyTesting.functionTests.tests.jdbcapi.LobStreamsTest
All Implemented Interfaces:
junit.framework.Test

public class LobStreamsTest
extends BaseJDBCTestCase


Field Summary
(package private)  int[] streamSize
           
private  java.lang.String unicodeTestString
           
 
Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
 
Constructor Summary
LobStreamsTest(java.lang.String name)
          Creates a new instance of LobStreamsTest
 
Method Summary
private  boolean compareClobReader2CharArray(char[] cArray, java.io.Reader charReader)
           
private  boolean compareLob2File(java.io.InputStream fStream, java.io.InputStream lStream)
           
private  int readBytesFromStream(byte[] b, java.io.InputStream is)
           
 void setUp()
          Set up the connection to the database.
static junit.framework.Test suite()
          Run with DerbyNetClient only.
 void testBlobWrite1Param()
          Tests the BlobOutputStream.write(int b) method
 void testBlobWrite3Param()
          Tests the BlobOutputStream.write(byte b[], int off, int len) method
 void testClobAsciiWrite1Param()
          Tests the ClobOutputStream.write(int b) method
 void testClobAsciiWrite3Param()
          Tests the ClobOutputStream.write(byte b[], int off, int len) method
 void testClobCharacterWrite1Char()
          Tests the ClobWriter.write(int c) method
 void testClobCharacterWrite1ParamString()
          Tests the ClobWriter.write(String str) method
 void testClobCharacterWrite3ParamChar()
          Tests the ClobWriter.write(char cbuf[], int off, int len) method
 void testClobCharacterWrite3ParamString()
          Tests the ClobWriter.write(String str, int off, int len) method
 
Methods inherited from class org.apache.derbyTesting.junit.BaseJDBCTestCase
assertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertTableRowCount, assertUpdateCount, assertUpdateCount, checkAllConsistency, checkEstimatedRowCount, commit, createStatement, createStatement, createStatement, dropTable, dropTable, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbedded
 
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

streamSize

int[] streamSize

unicodeTestString

private final java.lang.String unicodeTestString
See Also:
Constant Field Values
Constructor Detail

LobStreamsTest

public LobStreamsTest(java.lang.String name)
Creates a new instance of LobStreamsTest

Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Set up the connection to the database.

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

testBlobWrite3Param

public void testBlobWrite3Param()
                         throws java.lang.Exception
Tests the BlobOutputStream.write(byte b[], int off, int len) method

Throws:
java.lang.Exception

testBlobWrite1Param

public void testBlobWrite1Param()
                         throws java.lang.Exception
Tests the BlobOutputStream.write(int b) method

Throws:
java.lang.Exception

testClobAsciiWrite1Param

public void testClobAsciiWrite1Param()
                              throws java.lang.Exception
Tests the ClobOutputStream.write(int b) method

Throws:
java.lang.Exception

testClobAsciiWrite3Param

public void testClobAsciiWrite3Param()
                              throws java.lang.Exception
Tests the ClobOutputStream.write(byte b[], int off, int len) method

Throws:
java.lang.Exception

testClobCharacterWrite3ParamChar

public void testClobCharacterWrite3ParamChar()
                                      throws java.lang.Exception
Tests the ClobWriter.write(char cbuf[], int off, int len) method

Throws:
java.lang.Exception

testClobCharacterWrite3ParamString

public void testClobCharacterWrite3ParamString()
                                        throws java.lang.Exception
Tests the ClobWriter.write(String str, int off, int len) method

Throws:
java.lang.Exception

testClobCharacterWrite1ParamString

public void testClobCharacterWrite1ParamString()
                                        throws java.lang.Exception
Tests the ClobWriter.write(String str) method

Throws:
java.lang.Exception

testClobCharacterWrite1Char

public void testClobCharacterWrite1Char()
                                 throws java.lang.Exception
Tests the ClobWriter.write(int c) method

Throws:
java.lang.Exception

suite

public static junit.framework.Test suite()
Run with DerbyNetClient only. Embedded Clob/Blob.setXXXStream() methods are not implemented.


readBytesFromStream

private int readBytesFromStream(byte[] b,
                                java.io.InputStream is)
                         throws java.io.IOException
Throws:
java.io.IOException

compareLob2File

private boolean compareLob2File(java.io.InputStream fStream,
                                java.io.InputStream lStream)
                         throws java.lang.Exception
Throws:
java.lang.Exception

compareClobReader2CharArray

private boolean compareClobReader2CharArray(char[] cArray,
                                            java.io.Reader charReader)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

Built on Thu 2009-11-26 18:42:53-0800, from revision 884739

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.