diff options
Diffstat (limited to 'workflow-designer-be/src/test/java/org')
-rw-r--r-- | workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/WorkflowManagerTest.java | 2 | ||||
-rw-r--r-- | workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerTest.java | 2 | ||||
-rw-r--r-- | workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/mappers/VersionMapperTest.java (renamed from workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/mapping/VersionMapperTest.java) | 36 | ||||
-rw-r--r-- | workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/mappers/VersionStatusMapperTest.java (renamed from workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/mapping/VersionStatusMapperTest.java) | 3 | ||||
-rw-r--r-- | workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/mappers/WorkflowMapperTest.java (renamed from workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/mapping/WorkflowMapperTest.java) | 5 |
5 files changed, 21 insertions, 27 deletions
diff --git a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/WorkflowManagerTest.java b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/WorkflowManagerTest.java index 11c50cde..5173b063 100644 --- a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/WorkflowManagerTest.java +++ b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/WorkflowManagerTest.java @@ -17,7 +17,7 @@ import org.mockito.Mock; import org.onap.sdc.workflow.persistence.types.Workflow; import org.onap.sdc.workflow.services.UniqueValueService; import org.onap.sdc.workflow.services.exceptions.EntityNotFoundException; -import org.onap.sdc.workflow.services.mappers.WorkflowMapper; +import org.onap.sdc.workflow.services.impl.mappers.WorkflowMapper; import org.openecomp.sdc.versioning.ItemManager; import org.openecomp.sdc.versioning.types.Item; import org.openecomp.sdc.versioning.types.ItemStatus; diff --git a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerTest.java b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerTest.java index 0d5b0ad5..a82b5f3d 100644 --- a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerTest.java +++ b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerTest.java @@ -30,7 +30,7 @@ import org.onap.sdc.workflow.persistence.types.WorkflowVersion; import org.onap.sdc.workflow.persistence.types.WorkflowVersionStatus; import org.onap.sdc.workflow.services.exceptions.CreateVersionException; import org.onap.sdc.workflow.services.exceptions.EntityNotFoundException; -import org.onap.sdc.workflow.services.mappers.VersionMapper; +import org.onap.sdc.workflow.services.impl.mappers.VersionMapper; import org.openecomp.sdc.versioning.VersioningManager; import org.openecomp.sdc.versioning.dao.types.Version; import org.openecomp.sdc.versioning.dao.types.VersionStatus; diff --git a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/mapping/VersionMapperTest.java b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/mappers/VersionMapperTest.java index e7566f34..f9d65bd3 100644 --- a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/mapping/VersionMapperTest.java +++ b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/mappers/VersionMapperTest.java @@ -1,4 +1,4 @@ -package org.onap.sdc.workflow.api.mapping; +package org.onap.sdc.workflow.services.impl.mappers; import static org.junit.Assert.assertEquals; @@ -7,8 +7,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.onap.sdc.workflow.persistence.types.WorkflowVersion; import org.onap.sdc.workflow.persistence.types.WorkflowVersionStatus; -import org.onap.sdc.workflow.services.mappers.VersionMapper; -import org.onap.sdc.workflow.services.mappers.VersionStatusMapper; import org.openecomp.sdc.versioning.dao.types.Version; import org.openecomp.sdc.versioning.dao.types.VersionStatus; import org.springframework.beans.factory.annotation.Autowired; @@ -30,31 +28,31 @@ public class VersionMapperTest { @Test - public void shouldMapVersionToWorkflowVersion(){ + public void shouldMapVersionToWorkflowVersion() { Version version = createVersion(); WorkflowVersion mappedWorkflowVersion = versionMapper.versionToWorkflowVersion(version); - assertEquals(mappedWorkflowVersion.getId(),version.getId()); - assertEquals(mappedWorkflowVersion.getBaseId(),version.getBaseId()); - assertEquals(mappedWorkflowVersion.getDescription(),version.getDescription()); - assertEquals(mappedWorkflowVersion.getName(),version.getName()); - assertEquals(mappedWorkflowVersion.getCreationTime(),version.getCreationTime()); - assertEquals(mappedWorkflowVersion.getModificationTime(),version.getModificationTime()); + assertEquals(mappedWorkflowVersion.getId(), version.getId()); + assertEquals(mappedWorkflowVersion.getBaseId(), version.getBaseId()); + assertEquals(mappedWorkflowVersion.getDescription(), version.getDescription()); + assertEquals(mappedWorkflowVersion.getName(), version.getName()); + assertEquals(mappedWorkflowVersion.getCreationTime(), version.getCreationTime()); + assertEquals(mappedWorkflowVersion.getModificationTime(), version.getModificationTime()); } @Test - public void shouldMapWorkflowVersionToVersion(){ + public void shouldMapWorkflowVersionToVersion() { WorkflowVersion workflowVersion = createWorkflowVersion(); Version mappedVersion = versionMapper.workflowVersionToVersion(workflowVersion); - assertEquals(mappedVersion.getId(),workflowVersion.getId()); - assertEquals(mappedVersion.getBaseId(),workflowVersion.getBaseId()); - assertEquals(mappedVersion.getDescription(),workflowVersion.getDescription()); - assertEquals(mappedVersion.getName(),workflowVersion.getName()); - assertEquals(mappedVersion.getCreationTime(),workflowVersion.getCreationTime()); - assertEquals(mappedVersion.getModificationTime(),workflowVersion.getModificationTime()); + assertEquals(mappedVersion.getId(), workflowVersion.getId()); + assertEquals(mappedVersion.getBaseId(), workflowVersion.getBaseId()); + assertEquals(mappedVersion.getDescription(), workflowVersion.getDescription()); + assertEquals(mappedVersion.getName(), workflowVersion.getName()); + assertEquals(mappedVersion.getCreationTime(), workflowVersion.getCreationTime()); + assertEquals(mappedVersion.getModificationTime(), workflowVersion.getModificationTime()); } - private Version createVersion(){ + private Version createVersion() { Version version = new Version("version_id"); version.setBaseId("base_version_id"); version.setName("1.0"); @@ -67,7 +65,7 @@ public class VersionMapperTest { } - private WorkflowVersion createWorkflowVersion(){ + private WorkflowVersion createWorkflowVersion() { WorkflowVersion workflowVersion = new WorkflowVersion(); workflowVersion.setId("wf_version_id"); workflowVersion.setBaseId("wf_base_version_id"); diff --git a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/mapping/VersionStatusMapperTest.java b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/mappers/VersionStatusMapperTest.java index cb3444d4..0d4b6cd5 100644 --- a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/mapping/VersionStatusMapperTest.java +++ b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/mappers/VersionStatusMapperTest.java @@ -1,11 +1,10 @@ -package org.onap.sdc.workflow.api.mapping; +package org.onap.sdc.workflow.services.impl.mappers; import static org.junit.Assert.assertEquals; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.sdc.workflow.persistence.types.WorkflowVersionStatus; -import org.onap.sdc.workflow.services.mappers.VersionStatusMapper; import org.openecomp.sdc.versioning.dao.types.VersionStatus; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.ComponentScan; diff --git a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/mapping/WorkflowMapperTest.java b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/mappers/WorkflowMapperTest.java index 53f63091..55802cc0 100644 --- a/workflow-designer-be/src/test/java/org/onap/sdc/workflow/api/mapping/WorkflowMapperTest.java +++ b/workflow-designer-be/src/test/java/org/onap/sdc/workflow/services/impl/mappers/WorkflowMapperTest.java @@ -1,4 +1,4 @@ -package org.onap.sdc.workflow.api.mapping; +package org.onap.sdc.workflow.services.impl.mappers; import static org.junit.Assert.assertEquals; @@ -6,12 +6,9 @@ import static org.junit.Assert.assertNotNull; import static org.onap.sdc.workflow.TestUtil.createItem; import static org.onap.sdc.workflow.TestUtil.createWorkflow; -import java.util.HashMap; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.sdc.workflow.persistence.types.Workflow; -import org.onap.sdc.workflow.persistence.types.WorkflowProperty; -import org.onap.sdc.workflow.services.mappers.WorkflowMapper; import org.openecomp.sdc.versioning.types.Item; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.ComponentScan; |