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 7544b37c1d7 Add test cases for PluginPreconditions (#30272)
7544b37c1d7 is described below

commit 7544b37c1d7582f5a91b9fcf2a72cf467a2f07dc
Author: ilyas ahsan <[email protected]>
AuthorDate: Sat Feb 24 21:42:08 2024 +0700

    Add test cases for PluginPreconditions (#30272)
---
 .../preconditions/PluginPreconditionsTest.java     | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git 
a/agent/plugins/core/src/test/java/org/apache/shardingsphere/agent/plugin/core/preconditions/PluginPreconditionsTest.java
 
b/agent/plugins/core/src/test/java/org/apache/shardingsphere/agent/plugin/core/preconditions/PluginPreconditionsTest.java
new file mode 100644
index 00000000000..61b919c7feb
--- /dev/null
+++ 
b/agent/plugins/core/src/test/java/org/apache/shardingsphere/agent/plugin/core/preconditions/PluginPreconditionsTest.java
@@ -0,0 +1,30 @@
+/*
+ * 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.agent.plugin.core.preconditions;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+public class PluginPreconditionsTest {
+    
+    @Test
+    void assertCheckArgument() {
+        assertThrows(IllegalArgumentException.class, () -> 
PluginPreconditions.checkArgument(false, "Port `-3306` of MySQL Service must be 
a positive number."));
+    }
+}

Reply via email to