summaryrefslogtreecommitdiffstats
path: root/mdsal-resource/provider
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-09-28 13:46:03 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-28 13:46:03 +0000
commita9b5088b8333f994fe8ab5507b82de3eadbb2226 (patch)
tree66633efc0d5665404fe65fb516927d77f296997a /mdsal-resource/provider
parentcf7086880e3973edd9b066ad21da585b7a78eb4d (diff)
parent1cb7623802f69bdf23dd285d67bd662f94d9f2d3 (diff)
Merge "Add a unit test for mdsal"
Diffstat (limited to 'mdsal-resource/provider')
-rw-r--r--mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResourceTest.java43
1 files changed, 43 insertions, 0 deletions
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 000000000..f5b0bcf0c
--- /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));
+ }
+}
+