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 7dad5f0f37f Add test cases on CollectionValue (#33746)
7dad5f0f37f is described below

commit 7dad5f0f37fcb4902bae262d6c51458c345f11ac
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Nov 21 10:23:05 2024 +0800

    Add test cases on CollectionValue (#33746)
---
 .../core/value/collection/CollectionValueTest.java | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git 
a/parser/sql/statement/core/src/test/java/org/apache/shardingsphere/sql/parser/statement/core/value/collection/CollectionValueTest.java
 
b/parser/sql/statement/core/src/test/java/org/apache/shardingsphere/sql/parser/statement/core/value/collection/CollectionValueTest.java
new file mode 100644
index 00000000000..8d60979ae4f
--- /dev/null
+++ 
b/parser/sql/statement/core/src/test/java/org/apache/shardingsphere/sql/parser/statement/core/value/collection/CollectionValueTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.sql.parser.statement.core.value.collection;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.Arrays;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+class CollectionValueTest {
+    
+    @Test
+    void assertCombine() {
+        CollectionValue<String> collectionValue1 = new CollectionValue<>();
+        collectionValue1.getValue().add("foo");
+        CollectionValue<String> collectionValue2 = new CollectionValue<>();
+        collectionValue2.getValue().add("bar");
+        collectionValue1.combine(collectionValue2);
+        assertThat(collectionValue1.getValue(), is(Arrays.asList("foo", 
"bar")));
+    }
+}

Reply via email to