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 701dbd2b826 Add test cases for NamedRuleItemNodePath (#32458)
701dbd2b826 is described below

commit 701dbd2b82656e451a57d809d2cffe8e201fd5d0
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Aug 10 21:25:59 2024 +0800

    Add test cases for NamedRuleItemNodePath (#32458)
---
 .../mode/path/rule/item/NamedRuleItemNodePathTest.java            | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/mode/api/src/test/java/org/apache/shardingsphere/mode/path/rule/item/NamedRuleItemNodePathTest.java
 
b/mode/api/src/test/java/org/apache/shardingsphere/mode/path/rule/item/NamedRuleItemNodePathTest.java
index 72270aef22a..2d900a9db71 100644
--- 
a/mode/api/src/test/java/org/apache/shardingsphere/mode/path/rule/item/NamedRuleItemNodePathTest.java
+++ 
b/mode/api/src/test/java/org/apache/shardingsphere/mode/path/rule/item/NamedRuleItemNodePathTest.java
@@ -49,9 +49,15 @@ class NamedRuleItemNodePathTest {
     }
     
     @Test
-    void assertGetNameByActiveVersionPath() {
+    void assertGetNameByActiveVersion() {
         Optional<String> actual = 
converter.getNameByActiveVersion("/metadata/foo_db/rules/foo/tables/foo_table/active_version");
         assertTrue(actual.isPresent());
         assertThat(actual.get(), is("foo_table"));
     }
+    
+    @Test
+    void assertGetNameByActiveVersionWhenNotFound() {
+        Optional<String> actual = converter.getNameByActiveVersion("/invalid");
+        assertFalse(actual.isPresent());
+    }
 }

Reply via email to