diff options
author | Timoney, Dan (dt5972) <dtimoney@att.com> | 2019-09-05 10:58:54 -0400 |
---|---|---|
committer | Timoney, Dan (dt5972) <dtimoney@att.com> | 2019-09-05 10:58:54 -0400 |
commit | c3bfb60fff8fc530bdba7e0f3338c3a5e37899ea (patch) | |
tree | 7bfe94c3bb7e29686052f1af3f9c2b96a7cf635f /resource-assignment | |
parent | 116667df3977935f02206b3ce16e8d117ffa7545 (diff) |
Add junit coverage
Add junit test coverage for sli/adaptors
Change-Id: Ia487abd65ef9ed10d66c25e455414cd8fc736943
Issue-ID: CCSDK-1694
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Diffstat (limited to 'resource-assignment')
-rw-r--r-- | resource-assignment/provider/src/test/java/jtest/org/onap/ccsdk/sli/adaptors/rm/util/LabelUtilTest.java | 45 |
1 files changed, 45 insertions, 0 deletions
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 00000000..eb903ecd --- /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 |