Add junit coverage 56/95056/1
authorTimoney, Dan (dt5972) <dtimoney@att.com>
Thu, 5 Sep 2019 14:58:54 +0000 (10:58 -0400)
committerTimoney, Dan (dt5972) <dtimoney@att.com>
Thu, 5 Sep 2019 14:58:54 +0000 (10:58 -0400)
Add junit test coverage for sli/adaptors

Change-Id: Ia487abd65ef9ed10d66c25e455414cd8fc736943
Issue-ID: CCSDK-1694
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/rm/util/LabelUtilTest.java [new file with mode: 0644]

diff --git a/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/rm/util/LabelUtilTest.java b/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/rm/util/LabelUtilTest.java
new file mode 100644 (file)
index 0000000..eb903ec
--- /dev/null
@@ -0,0 +1,45 @@
+package jtest.org.onap.ccsdk.sli.adaptors.rm.util;
+
+import org.junit.Test;
+import org.onap.ccsdk.sli.adaptors.rm.data.AllocationItem;
+import org.onap.ccsdk.sli.adaptors.rm.data.LabelAllocationRequest;
+import org.onap.ccsdk.sli.adaptors.rm.data.LabelResource;
+import org.onap.ccsdk.sli.adaptors.rm.util.LabelUtil;
+
+import java.util.Date;
+
+import static org.junit.Assert.*;
+
+public class LabelUtilTest {
+
+    @Test
+    public void testLabelUtils() {
+        LabelAllocationRequest req = new LabelAllocationRequest();
+        req.check = true;
+        req.allocate = true;
+        req.label = "testLabel";
+        req.resourceUnionId = "123";
+        req.applicationId = "testApp";
+        req.assetId = "asset1";
+        req.resourceName = "resource1";
+        req.resourceSetId = "set1";
+
+
+
+        LabelResource resource = new LabelResource();
+        resource.label = "testLabel";
+
+        LabelUtil.allocateLabel(resource, req);
+        LabelUtil.checkLabel(resource, req);
+        LabelUtil.recalculate(resource);
+
+
+
+
+
+
+
+    }
+
+
+}
\ No newline at end of file