|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.extensions.TestDecorator
junit.extensions.TestSetup
org.apache.derbyTesting.functionTests.tests.jdbcapi.ClosedObjectTest.ObjectDecorator
private abstract static class ClosedObjectTest.ObjectDecorator
Abstract decorator class with functionality for obtaining a closed object.
| Field Summary | |
|---|---|
private ClosedObjectTest.DataSourceDecorator |
decorator_
Decorator which provides a connection. |
protected java.lang.Object |
object_
The closed object. |
| Fields inherited from class junit.extensions.TestDecorator |
|---|
fTest |
| Constructor Summary | |
|---|---|
ClosedObjectTest.ObjectDecorator(junit.framework.Test test,
ClosedObjectTest.DataSourceDecorator decorator)
Creates a new ObjectDecorator instance. |
|
| Method Summary | |
|---|---|
void |
checkException(java.lang.reflect.Method method,
java.sql.SQLException sqle)
Checks whether an exception is of the expected type for that method. |
protected abstract void |
checkSQLState(java.lang.reflect.Method method,
java.sql.SQLException sqle)
Checks whether the SQL state is as expected. |
protected java.sql.Connection |
createConnection()
Helper method for creating a connection. |
protected java.sql.Statement |
createStatement()
Helper method for creating a statement. |
boolean |
expectsException(java.lang.reflect.Method method)
Checks whether a method expects an exception to be thrown when the object is closed. |
java.lang.Object |
getClosedObject()
Returns the closed object. |
protected java.sql.CallableStatement |
prepareCall(java.lang.String call)
Helper method for creating a callable statement. |
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
Helper method for creating a prepared statement. |
protected void |
tearDown()
Tears down the test environment. |
| Methods inherited from class junit.extensions.TestSetup |
|---|
run, setUp |
| Methods inherited from class junit.extensions.TestDecorator |
|---|
basicRun, countTestCases, getTest, 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 |
|---|
private final ClosedObjectTest.DataSourceDecorator decorator_
protected java.lang.Object object_
| Constructor Detail |
|---|
public ClosedObjectTest.ObjectDecorator(junit.framework.Test test,
ClosedObjectTest.DataSourceDecorator decorator)
ObjectDecorator instance.
test - a test or suite to decoratedecorator - a decorator which provides a connection| Method Detail |
|---|
protected void tearDown()
throws java.lang.Exception
tearDown in class junit.extensions.TestSetupjava.lang.Exceptionpublic java.lang.Object getClosedObject()
public boolean expectsException(java.lang.reflect.Method method)
close(), isClosed() and
isValid() don't expect exceptions.
method - a method
true if an exception is expected
public final void checkException(java.lang.reflect.Method method,
java.sql.SQLException sqle)
throws java.sql.SQLException
method - a methodsqle - an exception
java.sql.SQLException - if the exception was not expected
protected abstract void checkSQLState(java.lang.reflect.Method method,
java.sql.SQLException sqle)
throws java.sql.SQLException
method - a Method valuesqle - a SQLException value
java.sql.SQLException - if an error occurs
protected java.sql.Connection createConnection()
throws java.sql.SQLException
java.sql.SQLException - if an error occurs
protected java.sql.Statement createStatement()
throws java.sql.SQLException
java.sql.SQLException - if an error occurs
protected java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
sql - statement text
java.sql.SQLException - if an error occurs
protected java.sql.CallableStatement prepareCall(java.lang.String call)
throws java.sql.SQLException
call - statement text
java.sql.SQLException - if an error occurs
|
Built on Sat 2009-11-28 18:44:18-0800, from revision 885187 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||