From c3bfb60fff8fc530bdba7e0f3338c3a5e37899ea Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 5 Sep 2019 10:58:54 -0400 Subject: Add junit coverage Add junit test coverage for sli/adaptors Change-Id: Ia487abd65ef9ed10d66c25e455414cd8fc736943 Issue-ID: CCSDK-1694 Signed-off-by: Timoney, Dan (dt5972) --- .../ccsdk/sli/adaptors/rm/util/LabelUtilTest.java | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/rm/util/LabelUtilTest.java (limited to 'resource-assignment/provider/src') 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 index 000000000..eb903ecdc --- /dev/null +++ b/resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/rm/util/LabelUtilTest.java @@ -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 -- cgit 1.2.3-korg