summaryrefslogtreecommitdiffstats
path: root/common/onap-common-configuration-management/onap-configuration-management-api/src/test/java/org/onap/config/api/ConfigurationLoaderTest.java
diff options
context:
space:
mode:
authorDmitry Puzikov <d.puzikov2@partner.samsung.com>2019-11-21 15:44:17 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-12-01 15:45:34 +0000
commit57c8700a4808665d5005de583a15354b9fb0b9f8 (patch)
treea57a8b871948674419309e30944a3f12ead01880 /common/onap-common-configuration-management/onap-configuration-management-api/src/test/java/org/onap/config/api/ConfigurationLoaderTest.java
parentd6890fce461c040c2776dfdedd47be282a29f877 (diff)
Fix sonar issue with test coverage
Added tests to cover the case. Fixed provider load failure: If more than one provider is configured and if the first if failng try to load next one. Change-Id: Idd7edb90e2b9b1cf21ec20e299140d3362bd1138 Issue-ID: SDC-2693 Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
Diffstat (limited to 'common/onap-common-configuration-management/onap-configuration-management-api/src/test/java/org/onap/config/api/ConfigurationLoaderTest.java')
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-api/src/test/java/org/onap/config/api/ConfigurationLoaderTest.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-api/src/test/java/org/onap/config/api/ConfigurationLoaderTest.java b/common/onap-common-configuration-management/onap-configuration-management-api/src/test/java/org/onap/config/api/ConfigurationLoaderTest.java
new file mode 100644
index 0000000000..10191a8ee7
--- /dev/null
+++ b/common/onap-common-configuration-management/onap-configuration-management-api/src/test/java/org/onap/config/api/ConfigurationLoaderTest.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP SDC
+ * ================================================================================
+ * Copyright (C) 2019 Samsung. All rights reserved.
+ * ================================================================================
+ * Licensed 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.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ */
+
+
+package org.onap.config.api;
+
+import org.junit.Test;
+import org.onap.config.api.impl.ConfigurationManagerTestImpl;
+
+import static org.junit.Assert.assertTrue;
+
+public class ConfigurationLoaderTest {
+
+ @Test
+ public void loadServiceProvider() {
+ Configuration config = ConfigurationLoader.load();
+ assertTrue(config instanceof ConfigurationManagerTestImpl);
+ }
+} \ No newline at end of file