aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src/test
diff options
context:
space:
mode:
authorSatyaki Mallick <satyaki.mallick@huawei.com>2018-10-26 11:40:37 +0530
committerMichael Lando <michael.lando@intl.att.com>2018-11-01 03:45:45 +0000
commit36471ae5484080b0a35672cf01c41bad66c35182 (patch)
tree1329c55ee3423e9b7a2d2ab66939ff698529ae94 /catalog-model/src/test
parentdb7afc1623e7d4cd88d1279375209239c4841fc4 (diff)
Add UT for ComponentValidationUtils
UT for ComponentValidationUtils. Issue-ID: SDC-1774 Change-Id: I0154d592a7f059b01843d7bf18f75a1e5bb9916f Signed-off-by: Satyaki Mallick <satyaki.mallick@huawei.com>
Diffstat (limited to 'catalog-model/src/test')
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/utils/ComponentValidationUtilsTest.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/utils/ComponentValidationUtilsTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/utils/ComponentValidationUtilsTest.java
new file mode 100644
index 0000000000..b2e7c60beb
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/utils/ComponentValidationUtilsTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.sdc.be.model.operations.utils;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.LifecycleStateEnum;
+import org.openecomp.sdc.be.model.Resource;
+
+import static org.junit.Assert.assertTrue;
+
+public class ComponentValidationUtilsTest {
+
+ private Resource resource;
+
+ @Before
+ public void setup() {
+ resource = new Resource();
+ resource.setLifecycleState(LifecycleStateEnum.NOT_CERTIFIED_CHECKOUT);
+ resource.setLastUpdaterUserId("jh003");
+ resource.setIsDeleted(false);
+ }
+
+ @Test
+ public void testCanWorkOnResource() {
+ assertTrue (ComponentValidationUtils.canWorkOnResource(resource, "jh003"));
+ }
+
+ @Test
+ public void testCanWorkOnComponent() {
+ assertTrue (ComponentValidationUtils.canWorkOnComponent(resource, "jh003"));
+ }
+} \ No newline at end of file