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

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.BlobStoredProcedureTest
All Implemented Interfaces:
junit.framework.Test

public class BlobStoredProcedureTest
extends BaseJDBCTestCase

Tests the stored procedures introduced as part of DERBY-208. These stored procedures will used by the Blob methods on the client side.


Field Summary
(package private)  java.lang.String testStr
           
(package private)  long testStrLength
           
 
Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
 
Constructor Summary
BlobStoredProcedureTest(java.lang.String name)
          Public constructor required for running test as standalone JUnit.
 
Method Summary
protected  void setUp()
          Setup the test.
static junit.framework.Test suite()
          Create a suite of tests.
protected  void tearDown()
          Cleanup the test.
 void testBlobCreateLocatorSP()
          Tests the locator value returned by the stored procedure BLOBCREATELOCATOR.
 void testBlobGetBytesSP()
          test the BLOBGETBYTES stored procedure which will be used in the implementation of Blob.getBytes.
 void testBlobGetLengthSP()
          Tests the SYSIBM.BLOBGETLENGTH stored procedure.
 void testBlobGetPositionFromBytesSP()
          Tests the SYSIBM.BLOBGETPOSITIONFROMBYTES stored procedure.
 void testBlobGetPositionFromLocatorSP()
          Tests the SYSIBM.BLOBGETPOSITIONFROMLOCATOR stored procedure.
 void testBlobReleaseLocatorSP()
          Tests the SYSIBM.BLOBRELEASELOCATOR stored procedure.
 void testBlobSetBytes()
          Tests the stored procedure SYSIBM.BLOBSETBYTES
 void testBlobTruncateSP()
          Test the stored procedure SYSIBM.BLOBGETLENGTH
 
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, 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

testStr

final java.lang.String testStr
See Also:
Constant Field Values

testStrLength

final long testStrLength
Constructor Detail

BlobStoredProcedureTest

public BlobStoredProcedureTest(java.lang.String name)
Public constructor required for running test as standalone JUnit.

Parameters:
name - a string containing the name of the test.
Method Detail

suite

public static junit.framework.Test suite()
Create a suite of tests.

Returns:
the test suite created.

setUp

protected void setUp()
              throws java.sql.SQLException,
                     java.io.UnsupportedEncodingException
Setup the test.

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.io.UnsupportedEncodingException
a - SQLException.
java.sql.SQLException

tearDown

protected void tearDown()
                 throws java.lang.Exception
Cleanup the test.

Overrides:
tearDown in class BaseJDBCTestCase
Throws:
SQLException.
java.lang.Exception

testBlobGetBytesSP

public void testBlobGetBytesSP()
                        throws java.sql.SQLException,
                               java.io.UnsupportedEncodingException
test the BLOBGETBYTES stored procedure which will be used in the implementation of Blob.getBytes.

Throws:
java.io.UnsupportedEncodingException
a - SQLException.
java.sql.SQLException

testBlobCreateLocatorSP

public void testBlobCreateLocatorSP()
                             throws java.sql.SQLException
Tests the locator value returned by the stored procedure BLOBCREATELOCATOR.

Throws:
SQLException.
java.sql.SQLException

testBlobReleaseLocatorSP

public void testBlobReleaseLocatorSP()
                              throws java.sql.SQLException
Tests the SYSIBM.BLOBRELEASELOCATOR stored procedure.

Throws:
java.sql.SQLException

testBlobGetLengthSP

public void testBlobGetLengthSP()
                         throws java.sql.SQLException
Tests the SYSIBM.BLOBGETLENGTH stored procedure.

Throws:
SQLException.
java.sql.SQLException

testBlobGetPositionFromBytesSP

public void testBlobGetPositionFromBytesSP()
                                    throws java.lang.Exception
Tests the SYSIBM.BLOBGETPOSITIONFROMBYTES stored procedure.

Throws:
SQLException.
java.lang.Exception

testBlobSetBytes

public void testBlobSetBytes()
                      throws java.sql.SQLException,
                             java.io.UnsupportedEncodingException
Tests the stored procedure SYSIBM.BLOBSETBYTES

Throws:
java.io.UnsupportedEncodingException
SQLException.
java.sql.SQLException

testBlobTruncateSP

public void testBlobTruncateSP()
                        throws java.sql.SQLException
Test the stored procedure SYSIBM.BLOBGETLENGTH

Throws:
java.sql.SQLException

testBlobGetPositionFromLocatorSP

public void testBlobGetPositionFromLocatorSP()
                                      throws java.sql.SQLException,
                                             java.io.UnsupportedEncodingException
Tests the SYSIBM.BLOBGETPOSITIONFROMLOCATOR stored procedure.

Throws:
java.io.UnsupportedEncodingException
SQLException.
java.sql.SQLException

Built on Wed 2009-11-25 18:43:31-0800, from revision 884373

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