aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/resource-dict/src/test
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-08-30 14:17:06 +0000
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-08-30 14:17:06 +0000
commite0bf80ea0f864a4da8bc2d9bf6e5b19bde75af41 (patch)
treef737c89033488ace40d95d1552ba266eb4d3a9c2 /ms/controllerblueprints/modules/resource-dict/src/test
parent2a7cd18ca4aaf6d050fe8740bcde53e9a214d224 (diff)
Controller Blueprints Microservice
Add Resource Seuencing validation and Optimise resource assignment validation logics Change-Id: I6f31ca5dbeb6f6aa89959b7d96fbfad25468b3a4 Issue-ID: CCSDK-416 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/controllerblueprints/modules/resource-dict/src/test')
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java37
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java6
2 files changed, 42 insertions, 1 deletions
diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java
new file mode 100644
index 00000000..c7444dba
--- /dev/null
+++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtilsTest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ *
+ * 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.
+ */
+
+package org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment;
+import java.util.List;
+/**
+ * BulkResourceSequencingUtils.
+ *
+ * @author Brinda Santh
+ */
+public class BulkResourceSequencingUtilsTest {
+
+ @Test
+ public void testProcess(){
+ List<ResourceAssignment> assignments = JacksonUtils.getListFromClassPathFile("validation/success.json", ResourceAssignment.class);
+ Assert.assertNotNull("failed to get ResourceAssignment from validation/success.json ", assignments);
+ BulkResourceSequencingUtils.process(assignments);
+ }
+} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
index 5c22f654..5ee56171 100644
--- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
+++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
@@ -32,7 +32,11 @@ import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
-
+/**
+ * ResourceDictionaryUtilsTest.
+ *
+ * @author Brinda Santh
+ */
public class ResourceDictionaryUtilsTest {
private static final Logger log = LoggerFactory.getLogger(ResourceDictionaryUtilsTest.class);