blob: eb903ecdcf2b69a10776108ce603df43c16f16a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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);
}
}
|