summaryrefslogtreecommitdiffstats
path: root/mdsal-resource
diff options
context:
space:
mode:
Diffstat (limited to 'mdsal-resource')
-rwxr-xr-xmdsal-resource/provider/pom.xml2
-rw-r--r--mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResourceTest.java43
2 files changed, 44 insertions, 1 deletions
diff --git a/mdsal-resource/provider/pom.xml b/mdsal-resource/provider/pom.xml
index ee0a3dc1..28eab682 100755
--- a/mdsal-resource/provider/pom.xml
+++ b/mdsal-resource/provider/pom.xml
@@ -18,7 +18,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.1</version>
+ <version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResourceTest.java b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResourceTest.java
new file mode 100644
index 00000000..f5b0bcf0
--- /dev/null
+++ b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResourceTest.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.ccsdk.sli.adaptors.resource.mdsal;
+
+import org.junit.Test;
+import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
+import org.onap.ccsdk.sli.core.sli.SvcLogicException;
+import org.onap.ccsdk.sli.core.sli.SvcLogicResource.QueryStatus;
+
+import static org.junit.Assert.assertEquals;
+
+public class ConfigResourceTest {
+ ConfigResource configResource = new ConfigResource("http", "local",
+ "10001", "admin",
+ "password");
+
+ @Test
+ public void isAvailableNegativeTest() throws SvcLogicException {
+ SvcLogicContext ctx = new SvcLogicContext();
+ assertEquals(QueryStatus.NOT_FOUND, configResource.isAvailable
+ ("xyz", "key", "prefix", ctx));
+ }
+}
+