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 2ae4b3aa80d [#19911]-Added unit test for JDBCRepositoryProviderFactory 
(#20665)
2ae4b3aa80d is described below

commit 2ae4b3aa80d22cd45f7a66b1a03f8f82bf1848d3
Author: Abhinav Koppula <[email protected]>
AuthorDate: Sun Sep 4 17:14:42 2022 +0530

    [#19911]-Added unit test for JDBCRepositoryProviderFactory (#20665)
---
 .../JDBCRepositoryProviderFactoryTest.java         | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-jdbc/shardingsphere-standalone-mode-repository-jdbc-core/src/test/java/org/apache/shardingsphere/mode/repository/standalone/jdbc/provider/JDBCRepositoryProviderFactoryTest.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere
 [...]
new file mode 100644
index 00000000000..6b733f1d5cc
--- /dev/null
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-jdbc/shardingsphere-standalone-mode-repository-jdbc-core/src/test/java/org/apache/shardingsphere/mode/repository/standalone/jdbc/provider/JDBCRepositoryProviderFactoryTest.java
@@ -0,0 +1,37 @@
+/*
+ * 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.mode.repository.standalone.jdbc.provider;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertThat;
+
+import 
org.apache.shardingsphere.mode.repository.standalone.jdbc.fixture.JDBCRepositoryProviderFixture;
+import org.junit.Test;
+
+public final class JDBCRepositoryProviderFactoryTest {
+    
+    @Test
+    public void assertGetInstanceWithType() {
+        assertThat(JDBCRepositoryProviderFactory.getInstance("FIXTURE"), 
instanceOf(JDBCRepositoryProviderFixture.class));
+    }
+    
+    @Test
+    public void assertGetInstanceWithoutType() {
+        assertThat(JDBCRepositoryProviderFactory.getInstance(null), 
instanceOf(JDBCRepositoryProviderFixture.class));
+    }
+}

Reply via email to