This is an automated email from the ASF dual-hosted git repository.
zhangyonglun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new d601770 Simplify UnsupportedUpdateOperationResultSetTest (#9161)
d601770 is described below
commit d601770763c6786c10a989d9f6b430d6b23f2a7d
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Jan 25 22:13:14 2021 +0800
Simplify UnsupportedUpdateOperationResultSetTest (#9161)
---
.../UnsupportedOperationDataSourceTest.java | 3 +-
.../UnsupportedOperationResultSetTest.java | 3 +-
.../UnsupportedUpdateOperationResultSetTest.java | 370 ++++++---------------
3 files changed, 95 insertions(+), 281 deletions(-)
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationDataSourceTest.java
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationDataSourceTest.java
index 539084c..c7f961e 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationDataSourceTest.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationDataSourceTest.java
@@ -17,7 +17,6 @@
package org.apache.shardingsphere.driver.jdbc.unsupported;
-import
org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForShardingTest;
import
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
import org.junit.Before;
import org.junit.Test;
@@ -27,7 +26,7 @@ import java.sql.SQLFeatureNotSupportedException;
import java.util.Collections;
import java.util.Properties;
-public final class UnsupportedOperationDataSourceTest extends
AbstractShardingSphereDataSourceForShardingTest {
+public final class UnsupportedOperationDataSourceTest {
private ShardingSphereDataSource shardingSphereDataSource;
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationResultSetTest.java
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationResultSetTest.java
index 3302829..584fed6 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationResultSetTest.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedOperationResultSetTest.java
@@ -17,7 +17,6 @@
package org.apache.shardingsphere.driver.jdbc.unsupported;
-import
org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForShardingTest;
import
org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext;
import org.apache.shardingsphere.infra.merge.result.MergedResult;
@@ -33,7 +32,7 @@ import java.util.Collections;
import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
import static org.mockito.Mockito.mock;
-public final class UnsupportedOperationResultSetTest extends
AbstractShardingSphereDataSourceForShardingTest {
+public final class UnsupportedOperationResultSetTest {
private ShardingSphereResultSet shardingSphereResultSet;
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedUpdateOperationResultSetTest.java
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedUpdateOperationResultSetTest.java
index 4935087..c1a4581 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedUpdateOperationResultSetTest.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/unsupported/UnsupportedUpdateOperationResultSetTest.java
@@ -17,10 +17,9 @@
package org.apache.shardingsphere.driver.jdbc.unsupported;
-import
org.apache.shardingsphere.driver.jdbc.base.AbstractShardingSphereDataSourceForShardingTest;
-import
org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection;
-import org.apache.shardingsphere.driver.jdbc.util.JDBCTestSQL;
-import org.junit.After;
+import
org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet;
+import org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext;
+import org.apache.shardingsphere.infra.merge.result.MergedResult;
import org.junit.Before;
import org.junit.Test;
@@ -36,611 +35,428 @@ import java.sql.SQLFeatureNotSupportedException;
import java.sql.Statement;
import java.sql.Time;
import java.sql.Timestamp;
-import java.util.Collection;
-import java.util.LinkedList;
+import java.util.Collections;
-public final class UnsupportedUpdateOperationResultSetTest extends
AbstractShardingSphereDataSourceForShardingTest {
-
- private final Collection<ShardingSphereConnection>
shardingSphereConnections = new LinkedList<>();
-
- private final Collection<Statement> statements = new LinkedList<>();
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+
+public final class UnsupportedUpdateOperationResultSetTest {
- private final Collection<ResultSet> resultSets = new LinkedList<>();
+ private ShardingSphereResultSet shardingSphereResultSet;
@Before
public void init() throws SQLException {
- ShardingSphereConnection connection =
getShardingSphereDataSource().getConnection();
- shardingSphereConnections.add(connection);
- Statement statement = connection.createStatement();
- statements.add(statement);
- ResultSet resultSet =
statement.executeQuery(JDBCTestSQL.SELECT_ORDER_BY_USER_ID_SQL);
- resultSets.add(resultSet);
- }
-
- @After
- public void close() throws SQLException {
- for (ResultSet each : resultSets) {
- each.close();
- }
- for (Statement each : statements) {
- each.close();
- }
- for (ShardingSphereConnection each : shardingSphereConnections) {
- each.close();
- }
+ shardingSphereResultSet = new ShardingSphereResultSet(
+ Collections.singletonList(mock(ResultSet.class,
RETURNS_DEEP_STUBS)), mock(MergedResult.class), mock(Statement.class),
mock(ExecutionContext.class));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNullForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateNull(1);
- }
+ shardingSphereResultSet.updateNull(1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNullForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateNull("label");
- }
+ shardingSphereResultSet.updateNull("label");
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBooleanForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBoolean(1, false);
- }
+ shardingSphereResultSet.updateBoolean(1, false);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBooleanForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBoolean("label", false);
- }
+ shardingSphereResultSet.updateBoolean("label", false);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateByteForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateByte(1, (byte) 1);
- }
+ shardingSphereResultSet.updateByte(1, (byte) 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateByteForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateByte("label", (byte) 1);
- }
+ shardingSphereResultSet.updateByte("label", (byte) 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateShortForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateShort(1, (short) 1);
- }
+ shardingSphereResultSet.updateShort(1, (short) 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateShortForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateShort("label", (short) 1);
- }
+ shardingSphereResultSet.updateShort("label", (short) 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateIntForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateInt(1, 1);
- }
+ shardingSphereResultSet.updateInt(1, 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateIntForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateInt("label", 1);
- }
+ shardingSphereResultSet.updateInt("label", 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateLongForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateLong(1, 1L);
- }
+ shardingSphereResultSet.updateLong(1, 1L);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateLongForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateLong("label", 1L);
- }
+ shardingSphereResultSet.updateLong("label", 1L);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateFloatForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateFloat(1, 1.0F);
- }
+ shardingSphereResultSet.updateFloat(1, 1.0F);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateFloatForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateFloat("label", 1.0F);
- }
+ shardingSphereResultSet.updateFloat("label", 1.0F);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateDoubleForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateDouble(1, 1.0D);
- }
+ shardingSphereResultSet.updateDouble(1, 1.0D);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateDoubleForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateDouble("label", 1.0D);
- }
+ shardingSphereResultSet.updateDouble("label", 1.0D);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBigDecimalForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBigDecimal(1, new BigDecimal("1"));
- }
+ shardingSphereResultSet.updateBigDecimal(1, new BigDecimal("1"));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBigDecimalForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBigDecimal("label", new BigDecimal("1"));
- }
+ shardingSphereResultSet.updateBigDecimal("label", new BigDecimal("1"));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateStringForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateString(1, "1");
- }
+ shardingSphereResultSet.updateString(1, "1");
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateStringForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateString("label", "1");
- }
+ shardingSphereResultSet.updateString("label", "1");
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNStringForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateNString(1, "");
- }
+ shardingSphereResultSet.updateNString(1, "");
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNStringForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateNString("label", "");
- }
+ shardingSphereResultSet.updateNString("label", "");
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBytesForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBytes(1, new byte[]{});
- }
+ shardingSphereResultSet.updateBytes(1, new byte[]{});
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBytesForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBytes("label", new byte[]{});
- }
+ shardingSphereResultSet.updateBytes("label", new byte[]{});
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateDateForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateDate(1, new Date(0L));
- }
+ shardingSphereResultSet.updateDate(1, new Date(0L));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateDateForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateDate("label", new Date(0L));
- }
+ shardingSphereResultSet.updateDate("label", new Date(0L));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateTimeForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateTime(1, new Time(0L));
- }
+ shardingSphereResultSet.updateTime(1, new Time(0L));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateTimeForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateTime("label", new Time(0L));
- }
+ shardingSphereResultSet.updateTime("label", new Time(0L));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateTimestampForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateTimestamp(1, new Timestamp(0L));
- }
+ shardingSphereResultSet.updateTimestamp(1, new Timestamp(0L));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateTimestampForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateTimestamp("label", new Timestamp(0L));
- }
+ shardingSphereResultSet.updateTimestamp("label", new Timestamp(0L));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateAsciiStreamForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateAsciiStream(1, System.in);
- }
+ shardingSphereResultSet.updateAsciiStream(1, System.in);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateAsciiStreamForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateAsciiStream("label", System.in);
- }
+ shardingSphereResultSet.updateAsciiStream("label", System.in);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateAsciiStreamForColumnIndexWithIntegerLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateAsciiStream(1, System.in, 1);
- }
+ shardingSphereResultSet.updateAsciiStream(1, System.in, 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateAsciiStreamForColumnLabelWithIntegerLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateAsciiStream("label", System.in, 1);
- }
+ shardingSphereResultSet.updateAsciiStream("label", System.in, 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateAsciiStreamForColumnIndexWithLongLength() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateAsciiStream(1, System.in, 1L);
- }
+ shardingSphereResultSet.updateAsciiStream(1, System.in, 1L);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateAsciiStreamForColumnLabelWithLongLength() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateAsciiStream("label", System.in, 1L);
- }
+ shardingSphereResultSet.updateAsciiStream("label", System.in, 1L);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBinaryStreamForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBinaryStream(1, System.in);
- }
+ shardingSphereResultSet.updateBinaryStream(1, System.in);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBinaryStreamForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBinaryStream("label", System.in);
- }
+ shardingSphereResultSet.updateBinaryStream("label", System.in);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBinaryStreamForColumnIndexWithIntegerLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBinaryStream(1, System.in, 1);
- }
+ shardingSphereResultSet.updateBinaryStream(1, System.in, 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBinaryStreamForColumnLabelWithIntegerLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBinaryStream("label", System.in, 1);
- }
+ shardingSphereResultSet.updateBinaryStream("label", System.in, 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBinaryStreamForColumnIndexWithLongLength() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateBinaryStream(1, System.in, 1L);
- }
+ shardingSphereResultSet.updateBinaryStream(1, System.in, 1L);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBinaryStreamForColumnLabelWithLongLength() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateBinaryStream("label", System.in, 1L);
- }
+ shardingSphereResultSet.updateBinaryStream("label", System.in, 1L);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateCharacterStreamForColumnIndex() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateCharacterStream(1, new StringReader(""));
- }
+ shardingSphereResultSet.updateCharacterStream(1, new StringReader(""));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateCharacterStreamForColumnLabel() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateCharacterStream("label", new StringReader(""));
- }
+ shardingSphereResultSet.updateCharacterStream("label", new
StringReader(""));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateCharacterStreamForColumnIndexWithIntegerLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateCharacterStream(1, new StringReader(""), 1);
- }
+ shardingSphereResultSet.updateCharacterStream(1, new StringReader(""),
1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateCharacterStreamForColumnLabelWithIntegerLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateCharacterStream("label", new StringReader(""), 1);
- }
+ shardingSphereResultSet.updateCharacterStream("label", new
StringReader(""), 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateCharacterStreamForColumnIndexWithLongLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateCharacterStream(1, new StringReader(""), 1L);
- }
+ shardingSphereResultSet.updateCharacterStream(1, new StringReader(""),
1L);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateCharacterStreamForColumnLabelWithLongLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateCharacterStream("label", new StringReader(""), 1L);
- }
+ shardingSphereResultSet.updateCharacterStream("label", new
StringReader(""), 1L);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNCharacterStreamForColumnIndex() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateNCharacterStream(1, new StringReader(""));
- }
+ shardingSphereResultSet.updateNCharacterStream(1, new
StringReader(""));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNCharacterStreamForColumnLabel() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateNCharacterStream("label", new StringReader(""));
- }
+ shardingSphereResultSet.updateNCharacterStream("label", new
StringReader(""));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNCharacterStreamForColumnIndexWithLength() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateNCharacterStream(1, new StringReader(""), 1);
- }
+ shardingSphereResultSet.updateNCharacterStream(1, new
StringReader(""), 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNCharacterStreamForColumnLabelWithLength() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateNCharacterStream("label", new StringReader(""), 1);
- }
+ shardingSphereResultSet.updateNCharacterStream("label", new
StringReader(""), 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateObjectForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateObject(1, new Object());
- }
+ shardingSphereResultSet.updateObject(1, new Object());
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateObjectForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateObject("label", new Object());
- }
+ shardingSphereResultSet.updateObject("label", new Object());
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateObjectForColumnIndexWithScaleOrLength() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateObject(1, new Object(), 1);
- }
+ shardingSphereResultSet.updateObject(1, new Object(), 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateObjectForColumnLabelWithScaleOrLength() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateObject("label", new Object(), 1);
- }
+ shardingSphereResultSet.updateObject("label", new Object(), 1);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateRefForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateRef(1, null);
- }
+ shardingSphereResultSet.updateRef(1, null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateRefForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateRef("label", null);
- }
+ shardingSphereResultSet.updateRef("label", null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBlobForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBlob(1, (Blob) null);
- }
+ shardingSphereResultSet.updateBlob(1, (Blob) null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBlobForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBlob("label", (Blob) null);
- }
+ shardingSphereResultSet.updateBlob("label", (Blob) null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBlobForColumnIndexWithInputStream() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateBlob(1, System.in);
- }
+ shardingSphereResultSet.updateBlob(1, System.in);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBlobForColumnLabelWithInputStream() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateBlob("label", System.in);
- }
+ shardingSphereResultSet.updateBlob("label", System.in);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBlobForColumnIndexWithInputStreamAndLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBlob(1, System.in, 100);
- }
+ shardingSphereResultSet.updateBlob(1, System.in, 100);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateBlobForColumnLabelWithInputStreamAndLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateBlob("label", System.in, 100);
- }
+ shardingSphereResultSet.updateBlob("label", System.in, 100);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateClobForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateClob(1, (Clob) null);
- }
+ shardingSphereResultSet.updateClob(1, (Clob) null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateClobForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateClob("label", (Clob) null);
- }
+ shardingSphereResultSet.updateClob("label", (Clob) null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateClobForColumnIndexWithInputStream() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateClob(1, new StringReader(""));
- }
+ shardingSphereResultSet.updateClob(1, new StringReader(""));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateClobForColumnLabelWithInputStream() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateClob("label", new StringReader(""));
- }
+ shardingSphereResultSet.updateClob("label", new StringReader(""));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateClobForColumnIndexWithInputStreamAndLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateClob(1, new StringReader(""), 100);
- }
+ shardingSphereResultSet.updateClob(1, new StringReader(""), 100);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateClobForColumnLabelWithInputStreamAndLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateClob("label", new StringReader(""), 100);
- }
+ shardingSphereResultSet.updateClob("label", new StringReader(""), 100);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNClobForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateNClob(1, (NClob) null);
- }
+ shardingSphereResultSet.updateNClob(1, (NClob) null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNClobForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateNClob("label", (NClob) null);
- }
+ shardingSphereResultSet.updateNClob("label", (NClob) null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNClobForColumnIndexWithInputStream() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateNClob(1, new StringReader(""));
- }
+ shardingSphereResultSet.updateNClob(1, new StringReader(""));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNClobForColumnLabelWithInputStream() throws
SQLException {
- for (ResultSet each : resultSets) {
- each.updateNClob("label", new StringReader(""));
- }
+ shardingSphereResultSet.updateNClob("label", new StringReader(""));
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNClobForColumnIndexWithInputStreamAndLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateNClob(1, new StringReader(""), 100);
- }
+ shardingSphereResultSet.updateNClob(1, new StringReader(""), 100);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateNClobForColumnLabelWithInputStreamAndLength()
throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateNClob("label", new StringReader(""), 100);
- }
+ shardingSphereResultSet.updateNClob("label", new StringReader(""),
100);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateArrayForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateArray(1, null);
- }
+ shardingSphereResultSet.updateArray(1, null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateArrayForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateArray("label", null);
- }
+ shardingSphereResultSet.updateArray("label", null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateRowIdForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateRowId(1, null);
- }
+ shardingSphereResultSet.updateRowId(1, null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateRowIdForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateRowId("label", null);
- }
+ shardingSphereResultSet.updateRowId("label", null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateSQLXMLForColumnIndex() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateSQLXML(1, null);
- }
+ shardingSphereResultSet.updateSQLXML(1, null);
}
@Test(expected = SQLFeatureNotSupportedException.class)
public void assertUpdateSQXMLForColumnLabel() throws SQLException {
- for (ResultSet each : resultSets) {
- each.updateSQLXML("label", null);
- }
+ shardingSphereResultSet.updateSQLXML("label", null);
}
}