public class SetObjectUnsupportedTest extends BaseJDBCTestCase
setObject() and setNull() with
sqlTargetType set to an unsupported type fails with
SQLFeatureNotSupportedException.| Modifier and Type | Class and Description |
|---|---|
private static class |
SetObjectUnsupportedTest.TypeInfo
Class with name and id for the target type used in a test.
|
| Modifier and Type | Field and Description |
|---|---|
private boolean |
callable
Flag indicating whether the test should use a
CallableStatement instead of a PreparedStatement.
|
private SetObjectUnsupportedTest.TypeInfo |
typeInfo
Name and id of the target type used in the test.
|
private static SetObjectUnsupportedTest.TypeInfo[] |
TYPES
The target types to test.
|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Modifier | Constructor and Description |
|---|---|
private |
SetObjectUnsupportedTest(java.lang.String name,
SetObjectUnsupportedTest.TypeInfo typeInfo,
boolean callable)
Creates a new
SetObjectUnsupportedTest instance. |
| Modifier and Type | Method and Description |
|---|---|
(package private) static junit.framework.Test |
baseSuite(boolean callable,
java.lang.String name)
Build a test suite which tests
setObject() with
each of the types in TYPES. |
java.lang.String |
getName()
Returns the name of the test.
|
private java.sql.PreparedStatement |
prepare()
Prepares a
PreparedStatement or a
CallableStatement to use in the test. |
static junit.framework.Test |
suite()
Create a suite with all tests.
|
void |
testUnsupportedSetNull()
Test that
setNull() with the specified
sqlTargetType throws
SQLFeatureNotSupportedException. |
void |
testUnsupportedSetNullWithTypeName()
Test that
setNull() with the specified
sqlTargetType throws
SQLFeatureNotSupportedException. |
void |
testUnsupportedSetObject()
Test that
setObject() with the specified
sqlTargetType throws
SQLFeatureNotSupportedException. |
void |
testUnsupportedSetObjectWithScale()
Test that
setObject() with the specified
sqlTargetType throws
SQLFeatureNotSupportedException. |
assertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, emptyStatementCache, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbeddedalarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemProperty, sleep, sleepAtLeastOneTick, traceitassertEquals, 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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, run, run, runTest, setName, setUp, toStringprivate final SetObjectUnsupportedTest.TypeInfo typeInfo
private final boolean callable
private static final SetObjectUnsupportedTest.TypeInfo[] TYPES
private SetObjectUnsupportedTest(java.lang.String name,
SetObjectUnsupportedTest.TypeInfo typeInfo,
boolean callable)
SetObjectUnsupportedTest instance.name - name of the testtypeInfo - description of the target type to use in the testcallable - if true, use a
CallableStatement instead of a
PreparedStatement.public java.lang.String getName()
getName in class junit.framework.TestCaseprivate java.sql.PreparedStatement prepare()
throws java.sql.SQLException
PreparedStatement or a
CallableStatement to use in the test.java.sql.SQLException - if a database error occurspublic void testUnsupportedSetObject()
throws java.sql.SQLException
setObject() with the specified
sqlTargetType throws
SQLFeatureNotSupportedException.java.sql.SQLException - if a database error occurspublic void testUnsupportedSetObjectWithScale()
throws java.sql.SQLException
setObject() with the specified
sqlTargetType throws
SQLFeatureNotSupportedException.java.sql.SQLException - if a database error occurspublic void testUnsupportedSetNull()
throws java.sql.SQLException
setNull() with the specified
sqlTargetType throws
SQLFeatureNotSupportedException.java.sql.SQLException - if a database error occurspublic void testUnsupportedSetNullWithTypeName()
throws java.sql.SQLException
setNull() with the specified
sqlTargetType throws
SQLFeatureNotSupportedException.java.sql.SQLException - if a database error occurspublic static junit.framework.Test suite()
static junit.framework.Test baseSuite(boolean callable,
java.lang.String name)
setObject() with
each of the types in TYPES.callable - if true, test with a
CallableStatement; otherwise, test with a
PreparedStatementApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.