This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang 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 04a792a17d1 Add test cases for MaskRuleConfiguration (#30578)
04a792a17d1 is described below

commit 04a792a17d1d5545f0540b8a3bc22d9f03f8c937
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Mar 21 14:55:02 2024 +0800

    Add test cases for MaskRuleConfiguration (#30578)
    
    * Refactor ReadwriteSplittingRuleConfiguration
    
    * Add test cases for MaskRuleConfiguration
    
    * Add test cases for MaskRuleConfiguration
---
 .../mask/api/config/MaskRuleConfigurationTest.java | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git 
a/features/mask/api/src/test/java/org/apache/shardingsphere/mask/api/config/MaskRuleConfigurationTest.java
 
b/features/mask/api/src/test/java/org/apache/shardingsphere/mask/api/config/MaskRuleConfigurationTest.java
new file mode 100644
index 00000000000..e01ee89e23b
--- /dev/null
+++ 
b/features/mask/api/src/test/java/org/apache/shardingsphere/mask/api/config/MaskRuleConfigurationTest.java
@@ -0,0 +1,40 @@
+/*
+ * 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.mask.api.config;
+
+import 
org.apache.shardingsphere.mask.api.config.rule.MaskTableRuleConfiguration;
+import org.junit.jupiter.api.Test;
+
+import java.util.Collections;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.mock;
+
+class MaskRuleConfigurationTest {
+    
+    @Test
+    void assertIsEmpty() {
+        assertTrue(new MaskRuleConfiguration(Collections.emptyList(), 
Collections.emptyMap()).isEmpty());
+    }
+    
+    @Test
+    void assertIsNotEmpty() {
+        assertFalse(new 
MaskRuleConfiguration(Collections.singleton(mock(MaskTableRuleConfiguration.class)),
 Collections.emptyMap()).isEmpty());
+    }
+}

Reply via email to