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

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

public class NullSQLTextTest
extends BaseJDBCTestCase

This test converts the old jdbcapi/nullSQLText.java test to JUnit.


Field Summary
 
Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
 
Constructor Summary
NullSQLTextTest(java.lang.String name)
          Create a test with the given name.
 
Method Summary
private static junit.framework.Test baseSuite(java.lang.String name)
           
static junit.framework.Test suite()
          Create suite containing client and embedded tests and to run all tests in this class
private static void testCommentStmt(java.sql.Statement st, java.lang.String sql, boolean expectFailure)
          Helper method for testDerby522().
 void testDerby522()
          Testing embedded comments in execute statement.
 void testNullStringExecuteQueryStatement()
          Testing null string in executeQuery statement.
 void testNullStringExecuteStatement()
          Testing null string in execute statement.
 void testNullStringExecuteUpdateStatement()
          Testing null string in executeUpdate statement.
 void testNullStringPreparedStatement()
          Testing null string in prepared statement.
static void zeroArg()
          Java method for procedure za()
 
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, setUp, 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
 

Constructor Detail

NullSQLTextTest

public NullSQLTextTest(java.lang.String name)
Create a test with the given name.

Parameters:
name - name of the test.
Method Detail

suite

public static junit.framework.Test suite()
Create suite containing client and embedded tests and to run all tests in this class


baseSuite

private static junit.framework.Test baseSuite(java.lang.String name)

testNullStringPreparedStatement

public void testNullStringPreparedStatement()
                                     throws java.sql.SQLException
Testing null string in prepared statement.

Throws:
java.sql.SQLException - if database access errors or other errors occur

testNullStringExecuteStatement

public void testNullStringExecuteStatement()
                                    throws java.sql.SQLException
Testing null string in execute statement.

Throws:
java.sql.SQLException - if database access errors or other errors occur

testNullStringExecuteQueryStatement

public void testNullStringExecuteQueryStatement()
                                         throws java.sql.SQLException
Testing null string in executeQuery statement.

Throws:
java.sql.SQLException - if database access errors or other errors occur

testNullStringExecuteUpdateStatement

public void testNullStringExecuteUpdateStatement()
                                          throws java.sql.SQLException
Testing null string in executeUpdate statement.

Throws:
java.sql.SQLException - if database access errors or other errors occur

testDerby522

public void testDerby522()
                  throws java.sql.SQLException
Testing embedded comments in execute statement.

Throws:
java.sql.SQLException - if database access errors or other errors occur

testCommentStmt

private static void testCommentStmt(java.sql.Statement st,
                                    java.lang.String sql,
                                    boolean expectFailure)
                             throws java.sql.SQLException
Helper method for testDerby522(). executes strings containing embedded comments.

Parameters:
sql - sql statement
Throws:
java.sql.SQLException - if database access errors or other errors occur

zeroArg

public static void zeroArg()
Java method for procedure za()


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.