eb903ecdcf2b69a10776108ce603df43c16f16a1
[ccsdk/sli.git] /
1 package jtest.org.onap.ccsdk.sli.adaptors.rm.util;
2
3 import org.junit.Test;
4 import org.onap.ccsdk.sli.adaptors.rm.data.AllocationItem;
5 import org.onap.ccsdk.sli.adaptors.rm.data.LabelAllocationRequest;
6 import org.onap.ccsdk.sli.adaptors.rm.data.LabelResource;
7 import org.onap.ccsdk.sli.adaptors.rm.util.LabelUtil;
8
9 import java.util.Date;
10
11 import static org.junit.Assert.*;
12
13 public class LabelUtilTest {
14
15     @Test
16     public void testLabelUtils() {
17         LabelAllocationRequest req = new LabelAllocationRequest();
18         req.check = true;
19         req.allocate = true;
20         req.label = "testLabel";
21         req.resourceUnionId = "123";
22         req.applicationId = "testApp";
23         req.assetId = "asset1";
24         req.resourceName = "resource1";
25         req.resourceSetId = "set1";
26
27
28
29         LabelResource resource = new LabelResource();
30         resource.label = "testLabel";
31
32         LabelUtil.allocateLabel(resource, req);
33         LabelUtil.checkLabel(resource, req);
34         LabelUtil.recalculate(resource);
35
36
37
38
39
40
41
42     }
43
44
45 }