You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by to...@apache.org on 2007/06/22 08:26:34 UTC
svn commit: r549732 -
/harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialArrayTest.java
Author: tonywu
Date: Thu Jun 21 23:26:33 2007
New Revision: 549732
URL: http://svn.apache.org/viewvc?view=rev&rev=549732
Log:
testcase for method SerialArray.free()
Modified:
harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialArrayTest.java
Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialArrayTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialArrayTest.java?view=diff&rev=549732&r1=549731&r2=549732
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialArrayTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/serial/SerialArrayTest.java Thu Jun 21 23:26:33 2007
@@ -20,6 +20,7 @@
import java.sql.ResultSet;
import java.sql.SQLData;
import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
import java.sql.SQLInput;
import java.sql.SQLOutput;
import java.sql.Types;
@@ -234,6 +235,29 @@
} catch (UnsupportedOperationException e) {
// expected
}
+ }
+
+ public void test_free() throws Exception {
+ try {
+ sa.free();
+ fail("should throw SQLFeatureNotSupportedException");
+ } catch (SQLFeatureNotSupportedException e) {
+ // expected
+ }
+ try {
+ sa.getResultSet(null);
+ fail("should throw UnsupportedOperationException");
+ } catch (UnsupportedOperationException e) {
+ // expected
+ }
+ try {
+ sa.getResultSet(0, 1, null);
+ fail("should throw UnsupportedOperationException");
+ } catch (UnsupportedOperationException e) {
+ // expected
+ }
+ // OK after its free
+ assertNotNull(sa.getArray());
}
class MockArray implements Array {