diff options
Diffstat (limited to 'catalog-be/src/test/java/org')
-rw-r--r-- | catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/DirectivesEnumTest.java (renamed from catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/DirectivesUtilsTest.java) | 31 | ||||
-rw-r--r-- | catalog-be/src/test/java/org/openecomp/sdc/be/nodeFilter/BaseServiceFilterUtilsTest.java | 4 |
2 files changed, 18 insertions, 17 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/DirectivesUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/DirectivesEnumTest.java index 9e27134a33..529625b451 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/DirectivesUtilsTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/utils/DirectivesEnumTest.java @@ -22,39 +22,40 @@ package org.openecomp.sdc.be.components.impl.utils; -import org.junit.Before; -import org.junit.Test; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; +import org.junit.Before; +import org.junit.Test; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -public class DirectivesUtilsTest { +public class DirectivesEnumTest { private List<String> directives; @Before - public void setup(){ + public void setup() { directives = new ArrayList<>(); } @Test - public void testGivenValidDirectives_returnsTrue(){ - directives.add(DirectivesUtils.DIRECTIVE.SUBSTITUTABLE.toString()); - directives.add(DirectivesUtils.DIRECTIVE.SELECTABLE.toString()); - assertTrue(DirectivesUtils.isValid(directives)); + public void testGivenValidDirectives_returnsTrue() { + directives.add(DirectivesEnum.SELECT.getValue()); + directives.add(DirectivesEnum.SELECTABLE.getValue()); + directives.add(DirectivesEnum.SUBSTITUTE.getValue()); + directives.add(DirectivesEnum.SUBSTITUTABLE.getValue()); + assertTrue(DirectivesEnum.isValid(directives)); } @Test - public void testGivenEmptyDirectives_returnsTrue(){ - assertTrue(DirectivesUtils.isValid(directives)); + public void testGivenEmptyDirectives_returnsTrue() { + assertTrue(DirectivesEnum.isValid(directives)); } @Test - public void testGivenInvalidDirectives_returnsFalse(){ + public void testGivenInvalidDirectives_returnsFalse() { directives.add("Invalid"); - assertFalse(DirectivesUtils.isValid(directives)); + assertFalse(DirectivesEnum.isValid(directives)); } }
\ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/nodeFilter/BaseServiceFilterUtilsTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/nodeFilter/BaseServiceFilterUtilsTest.java index 8ddf06abb8..adf6e4439d 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/nodeFilter/BaseServiceFilterUtilsTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/nodeFilter/BaseServiceFilterUtilsTest.java @@ -18,7 +18,7 @@ package org.openecomp.sdc.be.nodeFilter; import org.junit.Assert; import org.junit.Before; -import org.openecomp.sdc.be.components.impl.utils.DirectivesUtils; +import org.openecomp.sdc.be.components.impl.utils.DirectivesEnum; import org.openecomp.sdc.be.datatypes.elements.CINodeFilterDataDefinition; import org.openecomp.sdc.be.datatypes.elements.ListDataDefinition; import org.openecomp.sdc.be.datatypes.elements.RequirementNodeFilterPropertyDataDefinition; @@ -46,7 +46,7 @@ public class BaseServiceFilterUtilsTest { componentInstance.setUniqueId(CI_NAME); componentInstance.setName(CI_NAME); service.setComponentInstances(Arrays.asList(componentInstance)); - componentInstance.setDirectives(Arrays.asList(DirectivesUtils.SELECTABLE)); + componentInstance.setDirectives(Arrays.asList(DirectivesEnum.SELECTABLE.getValue())); CINodeFilterDataDefinition serviceFilter = new CINodeFilterDataDefinition(); componentInstance.setNodeFilter(serviceFilter); requirementNodeFilterPropertyDataDefinition = new RequirementNodeFilterPropertyDataDefinition(); |