You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by so...@apache.org on 2022/07/15 10:48:47 UTC

[shardingsphere] branch master updated: Create ConfigurationPropertyKeyTest.java (#19193)

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

soulasuna 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 82dfa38acf0 Create ConfigurationPropertyKeyTest.java (#19193)
82dfa38acf0 is described below

commit 82dfa38acf0993a62ea973a332a5b189f7314f4b
Author: skai <su...@gmail.com>
AuthorDate: Fri Jul 15 18:48:37 2022 +0800

    Create ConfigurationPropertyKeyTest.java (#19193)
    
    * Create ConfigurationPropertyKeyTest.java
    
    * change the method name
    
    Co-authored-by: skai <sk...@topode.com>
---
 .../config/props/ConfigurationPropertyKeyTest.java | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKeyTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKeyTest.java
new file mode 100644
index 00000000000..6f9fe07c2b5
--- /dev/null
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/props/ConfigurationPropertyKeyTest.java
@@ -0,0 +1,36 @@
+/*
+ * 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.infra.config.props;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.Collection;
+
+import org.junit.Test;
+
+public final class ConfigurationPropertyKeyTest {
+    
+    @Test
+    public void assertKeyNames() {
+        Collection<String> configurationPropertyKeyNames = ConfigurationPropertyKey.getKeyNames();
+        assertThat(configurationPropertyKeyNames.size(), is(ConfigurationPropertyKey.values().length));
+        configurationPropertyKeyNames.forEach(keyName -> assertNotNull(ConfigurationPropertyKey.valueOf(keyName)));
+    }
+}