From 968d54ca133fa53a3617fae6ff30e3ff06f1805e Mon Sep 17 00:00:00 2001 From: Yuli Shlosberg Date: Thu, 19 Oct 2017 23:39:36 +0300 Subject: add more unit tests remove imports Change-Id: If2274759f929f595e63d71cc70c374268c019947 Issue-Id: SDC-467 Signed-off-by: Yuli Shlosberg (cherry picked from commit b947eb599bfab4599ce1b0c0573b1701c646e429) --- .../clean/AsdcComponentsCleanerTaskTest.java | 66 ++++++++++++++++++++++ .../sdc/be/info/ArtifactTypesInfoTest.java | 60 ++++++++++++++++++++ .../info/DistributionStatusListResponseTest.java | 36 ++++++++++++ ...istributionStatusOfServiceListResponceTest.java | 37 ++++++++++++ .../openecomp/sdc/be/info/ServicesWrapperTest.java | 37 ++++++++++++ .../sdc/be/info/ToscaNodeTypeInterfaceTest.java | 37 ++++++++++++ .../detector/SwitchoverDetectorTest.java | 38 +++++++++++++ 7 files changed, 311 insertions(+) create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java (limited to 'catalog-be/src/test') diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java new file mode 100644 index 0000000000..be55cbd12a --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java @@ -0,0 +1,66 @@ +package org.openecomp.sdc.be.components.clean; + +import javax.annotation.Generated; + +import org.junit.Test; + + +public class AsdcComponentsCleanerTaskTest { + + private AsdcComponentsCleanerTask createTestSubject() { + return new AsdcComponentsCleanerTask(); + } + + + @Test + public void testInit() throws Exception { + AsdcComponentsCleanerTask testSubject; + + // default test + testSubject = createTestSubject(); + testSubject.init(); + } + + + @Test + public void testDestroy() throws Exception { + AsdcComponentsCleanerTask testSubject; + + // default test + testSubject = createTestSubject(); + testSubject.destroy(); + } + + + @Test + public void testStartTask() throws Exception { + AsdcComponentsCleanerTask testSubject; + + // default test + testSubject = createTestSubject(); + testSubject.startTask(); + } + + + @Test + public void testStopTask() throws Exception { + AsdcComponentsCleanerTask testSubject; + + // default test + testSubject = createTestSubject(); + testSubject.stopTask(); + } + + + + + + @Test + public void testRun() throws Exception { + AsdcComponentsCleanerTask testSubject; + + // default test + testSubject = createTestSubject(); + testSubject.run(); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java new file mode 100644 index 0000000000..4010d9bf86 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java @@ -0,0 +1,60 @@ +package org.openecomp.sdc.be.info; + +import java.util.List; + +import javax.annotation.Generated; + +import org.junit.Test; +import org.openecomp.sdc.be.model.ArtifactType; + + +public class ArtifactTypesInfoTest { + + private ArtifactTypesInfo createTestSubject() { + return new ArtifactTypesInfo(); + } + + + @Test + public void testGetArtifactTypes() throws Exception { + ArtifactTypesInfo testSubject; + List result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getArtifactTypes(); + } + + + @Test + public void testSetArtifactTypes() throws Exception { + ArtifactTypesInfo testSubject; + List artifactTypes = null; + + // default test + testSubject = createTestSubject(); + testSubject.setArtifactTypes(artifactTypes); + } + + + @Test + public void testGetHeatDefaultTimeout() throws Exception { + ArtifactTypesInfo testSubject; + Integer result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getHeatDefaultTimeout(); + } + + + @Test + public void testSetHeatDefaultTimeout() throws Exception { + ArtifactTypesInfo testSubject; + Integer heatDefaultTimeout = 0; + + // default test + testSubject = createTestSubject(); + testSubject.setHeatDefaultTimeout(heatDefaultTimeout); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java new file mode 100644 index 0000000000..db4d735a7e --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java @@ -0,0 +1,36 @@ +package org.openecomp.sdc.be.info; + +import java.util.List; + +import javax.annotation.Generated; + +import org.junit.Test; + +public class DistributionStatusListResponseTest { + + private DistributionStatusListResponse createTestSubject() { + return new DistributionStatusListResponse(); + } + + + @Test + public void testGetDistributionStatusList() throws Exception { + DistributionStatusListResponse testSubject; + List result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDistributionStatusList(); + } + + + @Test + public void testSetDistributionStatusList() throws Exception { + DistributionStatusListResponse testSubject; + List distribStatusInfoList = null; + + // default test + testSubject = createTestSubject(); + testSubject.setDistributionStatusList(distribStatusInfoList); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java new file mode 100644 index 0000000000..830292a66f --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java @@ -0,0 +1,37 @@ +package org.openecomp.sdc.be.info; + +import java.util.List; + +import javax.annotation.Generated; + +import org.junit.Test; + + +public class DistributionStatusOfServiceListResponceTest { + + private DistributionStatusOfServiceListResponce createTestSubject() { + return new DistributionStatusOfServiceListResponce(); + } + + + @Test + public void testGetDistributionStatusOfServiceList() throws Exception { + DistributionStatusOfServiceListResponce testSubject; + List result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDistributionStatusOfServiceList(); + } + + + @Test + public void testSetDistributionStatusOfServiceList() throws Exception { + DistributionStatusOfServiceListResponce testSubject; + List distribStatusOfServiceInfoList = null; + + // default test + testSubject = createTestSubject(); + testSubject.setDistributionStatusOfServiceList(distribStatusOfServiceInfoList); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java new file mode 100644 index 0000000000..085583aa2d --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java @@ -0,0 +1,37 @@ +package org.openecomp.sdc.be.info; + +import java.util.List; + +import javax.annotation.Generated; + +import org.junit.Test; + + +public class ServicesWrapperTest { + + private ServicesWrapper createTestSubject() { + return new ServicesWrapper(); + } + + + @Test + public void testGetServices() throws Exception { + ServicesWrapper testSubject; + List result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getServices(); + } + + + @Test + public void testSetServices() throws Exception { + ServicesWrapper testSubject; + List services = null; + + // default test + testSubject = createTestSubject(); + testSubject.setServices(services); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java new file mode 100644 index 0000000000..80ae443afe --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java @@ -0,0 +1,37 @@ +package org.openecomp.sdc.be.info; + +import java.util.List; + +import javax.annotation.Generated; + +import org.junit.Test; + + +public class ToscaNodeTypeInterfaceTest { + + private ToscaNodeTypeInterface createTestSubject() { + return new ToscaNodeTypeInterface(); + } + + + @Test + public void testGetScripts() throws Exception { + ToscaNodeTypeInterface testSubject; + List result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getScripts(); + } + + + @Test + public void testSetScripts() throws Exception { + ToscaNodeTypeInterface testSubject; + List scripts = null; + + // default test + testSubject = createTestSubject(); + testSubject.setScripts(scripts); + } +} \ No newline at end of file diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java new file mode 100644 index 0000000000..f93819c0a1 --- /dev/null +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java @@ -0,0 +1,38 @@ +package org.openecomp.sdc.be.switchover.detector; + +import javax.annotation.Generated; + +import org.junit.Test; + + +public class SwitchoverDetectorTest { + + private SwitchoverDetector createTestSubject() { + return new SwitchoverDetector(); + } + + + @Test + public void testGetSiteMode() throws Exception { + SwitchoverDetector testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getSiteMode(); + } + + + @Test + public void testSetSiteMode() throws Exception { + SwitchoverDetector testSubject; + String mode = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setSiteMode(mode); + } + + + +} \ No newline at end of file -- cgit 1.2.3-korg