This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 cbe0660dcce Add more test cases on DialectResultSetMapperTest (#38109)
cbe0660dcce is described below
commit cbe0660dcce16f6c40ad067d2b305282bcba4873
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Feb 20 12:09:50 2026 +0800
Add more test cases on DialectResultSetMapperTest (#38109)
---
.../core/resultset/DialectResultSetMapperTest.java | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git
a/database/connector/core/src/test/java/org/apache/shardingsphere/database/connector/core/resultset/DialectResultSetMapperTest.java
b/database/connector/core/src/test/java/org/apache/shardingsphere/database/connector/core/resultset/DialectResultSetMapperTest.java
new file mode 100644
index 00000000000..20f7e0cd985
--- /dev/null
+++
b/database/connector/core/src/test/java/org/apache/shardingsphere/database/connector/core/resultset/DialectResultSetMapperTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.database.connector.core.resultset;
+
+import org.junit.jupiter.api.Test;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.Mockito.CALLS_REAL_METHODS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+class DialectResultSetMapperTest {
+
+ private final DialectResultSetMapper dialectResultSetMapper =
mock(DialectResultSetMapper.class, CALLS_REAL_METHODS);
+
+ @Test
+ void assertGetDefaultValue() throws SQLException {
+ ResultSet resultSet = mock(ResultSet.class);
+ Object expectedValue = new Object();
+ when(resultSet.getObject(1)).thenReturn(expectedValue);
+ assertThat(dialectResultSetMapper.getDefaultValue(resultSet, 1, 0),
is(expectedValue));
+ }
+}