aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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