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

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

public class ClobStoredProcedureTest
extends BaseJDBCTestCase

Tests the stored procedures introduced as part of DERBY-208. These stored procedures will used by the Clob 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
ClobStoredProcedureTest(java.lang.String name)
          Public constructor required for running test as standalone JUnit.
 
Method Summary
 void setUp()
          Setup the test.
static junit.framework.Test suite()
          Create a suite of tests.
 void tearDown()
          Cleanup the test.
 void testClobCreateLocatorSP()
          Tests the locator value returned by the stored procedure CLOBCREATELOCATOR.
 void testClobGetLengthSP()
          Tests the stored procedure SYSIBM.CLOBGETLENGTH.
 void testClobGetPositionFromLocatorSP()
          Tests the SYSIBM.CLOBGETPOSITIONFROMLOCATOR stored procedure.
 void testClobGetPositionFromStringSP()
          Tests the stored procedure SYSIBM.CLOBGETPOSITIONFROMSTRING.
 void testClobReleaseLocatorSP()
          Tests the SYSIBM.CLOBRELEASELOCATOR stored procedure.
 void testClobSetStringSP()
          Tests the stored procedure SYSIBM.CLOBSETSTRING
 void testClobTruncateSP()
          Test the stored procedure SYSIBM.CLOBGETLENGTH
 void testGetSubStringSP()
          Test the stored procedure SYSIBM.CLOBGETSUBSTRING
 
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

ClobStoredProcedureTest

public ClobStoredProcedureTest(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

public void setUp()
           throws java.lang.Exception
Setup the test.

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

tearDown

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

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

testGetSubStringSP

public void testGetSubStringSP()
                        throws java.sql.SQLException
Test the stored procedure SYSIBM.CLOBGETSUBSTRING

Throws:
an - SQLException.
java.sql.SQLException

testClobCreateLocatorSP

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

Throws:
SQLException.
java.sql.SQLException

testClobReleaseLocatorSP

public void testClobReleaseLocatorSP()
                              throws java.sql.SQLException
Tests the SYSIBM.CLOBRELEASELOCATOR stored procedure.

Throws:
java.sql.SQLException

testClobGetLengthSP

public void testClobGetLengthSP()
                         throws java.sql.SQLException
Tests the stored procedure SYSIBM.CLOBGETLENGTH.

Throws:
java.sql.SQLException

testClobGetPositionFromStringSP

public void testClobGetPositionFromStringSP()
                                     throws java.sql.SQLException
Tests the stored procedure SYSIBM.CLOBGETPOSITIONFROMSTRING.

Throws:
SQLException.
java.sql.SQLException

testClobSetStringSP

public void testClobSetStringSP()
                         throws java.sql.SQLException
Tests the stored procedure SYSIBM.CLOBSETSTRING

Throws:
SQLException.
java.sql.SQLException

testClobTruncateSP

public void testClobTruncateSP()
                        throws java.sql.SQLException
Test the stored procedure SYSIBM.CLOBGETLENGTH

Throws:
java.sql.SQLException

testClobGetPositionFromLocatorSP

public void testClobGetPositionFromLocatorSP()
                                      throws java.sql.SQLException
Tests the SYSIBM.CLOBGETPOSITIONFROMLOCATOR stored procedure.

Throws:
SQLException.
java.sql.SQLException

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.