diff options
Diffstat (limited to 'common-app-api/src/test/java/org/openecomp/sdc/common')
11 files changed, 931 insertions, 12 deletions
diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java index 14519a45ef..8eab423743 100644 --- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ArtifactGroupTypeEnumTest.java @@ -30,7 +30,7 @@ public class ArtifactGroupTypeEnumTest { // default test testSubject = createTestSubject(); - testSubject.setType(type); + testSubject.setType(ArtifactGroupTypeEnum.DEPLOYMENT.getType()); } diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/ConfigurationListenerTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ConfigurationListenerTest.java new file mode 100644 index 0000000000..bdfedd89cf --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/ConfigurationListenerTest.java @@ -0,0 +1,52 @@ +package org.openecomp.sdc.common.api; + +import javax.annotation.Generated; + +import org.junit.Test; + +public class ConfigurationListenerTest { + + private ConfigurationListener createTestSubject() { + return new ConfigurationListener(null, null); + } + + @Test + public void testGetType() throws Exception { + ConfigurationListener testSubject; + Class<? extends BasicConfiguration> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getType(); + } + + @Test + public void testSetType() throws Exception { + ConfigurationListener testSubject; + Class<? extends BasicConfiguration> type = null; + + // default test + testSubject = createTestSubject(); + testSubject.setType(type); + } + + @Test + public void testGetCallBack() throws Exception { + ConfigurationListener testSubject; + FileChangeCallback result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCallBack(); + } + + @Test + public void testSetCallBack() throws Exception { + ConfigurationListener testSubject; + FileChangeCallback callBack = null; + + // default test + testSubject = createTestSubject(); + testSubject.setCallBack(callBack); + } +}
\ No newline at end of file diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/HealthCheckInfoTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/HealthCheckInfoTest.java index d37e1ccbb7..0da2aa3271 100644 --- a/common-app-api/src/test/java/org/openecomp/sdc/common/api/HealthCheckInfoTest.java +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/HealthCheckInfoTest.java @@ -5,14 +5,12 @@ import java.util.List; import org.junit.Test; import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckStatus; - public class HealthCheckInfoTest { private HealthCheckInfo createTestSubject() { - return new HealthCheckInfo(null, null, "", ""); + return new HealthCheckInfo("", HealthCheckStatus.UP, "", ""); } - @Test public void testGetHealthCheckComponent() throws Exception { HealthCheckInfo testSubject; @@ -23,7 +21,6 @@ public class HealthCheckInfoTest { result = testSubject.getHealthCheckComponent(); } - @Test public void testGetHealthCheckStatus() throws Exception { HealthCheckInfo testSubject; @@ -34,7 +31,6 @@ public class HealthCheckInfoTest { result = testSubject.getHealthCheckStatus(); } - @Test public void testGetComponentsInfo() throws Exception { HealthCheckInfo testSubject; @@ -45,7 +41,6 @@ public class HealthCheckInfoTest { result = testSubject.getComponentsInfo(); } - @Test public void testSetComponentsInfo() throws Exception { HealthCheckInfo testSubject; @@ -56,7 +51,6 @@ public class HealthCheckInfoTest { testSubject.setComponentsInfo(componentsInfo); } - @Test public void testGetVersion() throws Exception { HealthCheckInfo testSubject; @@ -67,7 +61,6 @@ public class HealthCheckInfoTest { result = testSubject.getVersion(); } - @Test public void testSetVersion() throws Exception { HealthCheckInfo testSubject; @@ -78,7 +71,6 @@ public class HealthCheckInfoTest { testSubject.setVersion(version); } - @Test public void testGetDescription() throws Exception { HealthCheckInfo testSubject; @@ -89,7 +81,6 @@ public class HealthCheckInfoTest { result = testSubject.getDescription(); } - @Test public void testToString() throws Exception { HealthCheckInfo testSubject; @@ -100,7 +91,6 @@ public class HealthCheckInfoTest { result = testSubject.toString(); } - @Test public void testMain() throws Exception { String[] args = new String[] { "" }; diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/api/UploadArtifactInfoTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/api/UploadArtifactInfoTest.java new file mode 100644 index 0000000000..9df5fad7ba --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/api/UploadArtifactInfoTest.java @@ -0,0 +1,146 @@ +package org.openecomp.sdc.common.api; + +import javax.annotation.Generated; + +import org.junit.Assert; +import org.junit.Test; + +public class UploadArtifactInfoTest { + + private UploadArtifactInfo createTestSubject() { + return new UploadArtifactInfo(); + } + + @Test + public void testGetArtifactName() throws Exception { + UploadArtifactInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getArtifactName(); + } + + @Test + public void testSetArtifactName() throws Exception { + UploadArtifactInfo testSubject; + String artifactName = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setArtifactName(artifactName); + } + + @Test + public void testGetArtifactPath() throws Exception { + UploadArtifactInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getArtifactPath(); + } + + @Test + public void testSetArtifactPath() throws Exception { + UploadArtifactInfo testSubject; + String artifactPath = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setArtifactPath(artifactPath); + } + + @Test + public void testGetArtifactType() throws Exception { + UploadArtifactInfo testSubject; + ArtifactTypeEnum result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getArtifactType(); + } + + @Test + public void testSetArtifactType() throws Exception { + UploadArtifactInfo testSubject; + ArtifactTypeEnum artifactType = null; + + // default test + testSubject = createTestSubject(); + testSubject.setArtifactType(artifactType); + } + + @Test + public void testGetArtifactDescription() throws Exception { + UploadArtifactInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getArtifactDescription(); + } + + @Test + public void testSetArtifactDescription() throws Exception { + UploadArtifactInfo testSubject; + String artifactDescription = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setArtifactDescription(artifactDescription); + } + + @Test + public void testGetArtifactData() throws Exception { + UploadArtifactInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getArtifactData(); + } + + @Test + public void testSetArtifactData() throws Exception { + UploadArtifactInfo testSubject; + String artifactData = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setArtifactData(artifactData); + } + + @Test + public void testHashCode() throws Exception { + UploadArtifactInfo testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.hashCode(); + } + + @Test + public void testEquals() throws Exception { + UploadArtifactInfo testSubject; + Object obj = null; + boolean result; + + // test 1 + testSubject = createTestSubject(); + obj = null; + result = testSubject.equals(obj); + Assert.assertEquals(false, result); + } + + @Test + public void testToString() throws Exception { + UploadArtifactInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } +}
\ No newline at end of file diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/config/EcompErrorConfigurationTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/config/EcompErrorConfigurationTest.java new file mode 100644 index 0000000000..7ebe341b9c --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/config/EcompErrorConfigurationTest.java @@ -0,0 +1,61 @@ +package org.openecomp.sdc.common.config; + +import java.util.Map; + +import javax.annotation.Generated; + +import org.junit.Assert; +import org.junit.Test; + + +public class EcompErrorConfigurationTest { + + private EcompErrorConfiguration createTestSubject() { + return new EcompErrorConfiguration(); + } + + + @Test + public void testGetErrors() throws Exception { + EcompErrorConfiguration testSubject; + Map<String, EcompErrorInfo> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getErrors(); + } + + + + @Test + public void testGetEcompErrorInfo() throws Exception { + EcompErrorConfiguration testSubject; + String key = ""; + EcompErrorInfo result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getEcompErrorInfo(key); + } + + + + @Test + public void testToString() throws Exception { + EcompErrorConfiguration testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } + + + @Test + public void testMain() throws Exception { + String[] args = new String[] { "" }; + + // default test + EcompErrorConfiguration.main(args); + } +}
\ No newline at end of file diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/config/EcompErrorInfoTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/config/EcompErrorInfoTest.java new file mode 100644 index 0000000000..65fc197e62 --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/config/EcompErrorInfoTest.java @@ -0,0 +1,113 @@ +package org.openecomp.sdc.common.config; + +import javax.annotation.Generated; + +import org.junit.Test; + +public class EcompErrorInfoTest { + + private EcompErrorInfo createTestSubject() { + return new EcompErrorInfo(); + } + + @Test + public void testGetType() throws Exception { + EcompErrorInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getType(); + } + + @Test + public void testSetType() throws Exception { + EcompErrorInfo testSubject; + String type = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setType(type); + } + + @Test + public void testGetCode() throws Exception { + EcompErrorInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCode(); + } + + @Test + public void testSetCode() throws Exception { + EcompErrorInfo testSubject; + String code = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setCode(code); + } + + @Test + public void testGetSeverity() throws Exception { + EcompErrorInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getSeverity(); + } + + @Test + public void testSetSeverity() throws Exception { + EcompErrorInfo testSubject; + String severity = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setSeverity(severity); + } + + @Test + public void testGetDescription() throws Exception { + EcompErrorInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDescription(); + } + + @Test + public void testSetDescription() throws Exception { + EcompErrorInfo testSubject; + String description = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setDescription(description); + } + + @Test + public void testGetAlarmSeverity() throws Exception { + EcompErrorInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAlarmSeverity(); + } + + @Test + public void testSetAlarmSeverity() throws Exception { + EcompErrorInfo testSubject; + String alarmSeverity = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setAlarmSeverity(alarmSeverity); + } + +}
\ No newline at end of file diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsvTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsvTest.java new file mode 100644 index 0000000000..bdcbca016d --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsvTest.java @@ -0,0 +1,34 @@ +package org.openecomp.sdc.common.config.generation; + +import javax.annotation.Generated; + +import org.junit.Test; + +public class GenerateEcompErrorsCsvTest { + + private GenerateEcompErrorsCsv createTestSubject() { + return new GenerateEcompErrorsCsv(); + } + + + @Test + public void testGenerateEcompErrorsCsvFile() throws Exception { + GenerateEcompErrorsCsv testSubject; + String targetFolder = ""; + boolean addTimeToFileName = false; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.generateEcompErrorsCsvFile(targetFolder, addTimeToFileName); + } + + + @Test + public void testMain() throws Exception { + String[] args = new String[] { "" }; + + // default test + GenerateEcompErrorsCsv.main(args); + } +}
\ No newline at end of file diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/ecomplog/EcompLoggerMetricTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/ecomplog/EcompLoggerMetricTest.java new file mode 100644 index 0000000000..e3efad46ed --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/ecomplog/EcompLoggerMetricTest.java @@ -0,0 +1,316 @@ +package org.openecomp.sdc.common.ecomplog; + +import org.junit.Test; +import org.openecomp.sdc.common.ecomplog.Enums.Severity; +import org.openecomp.sdc.common.ecomplog.api.IEcompMdcWrapper; + +public class EcompLoggerMetricTest { + + private EcompLoggerMetric createTestSubject() { + return new EcompLoggerMetric(new EcompMDCWrapper(new Stopwatch())); + } + + + @Test + public void testGetInstance() throws Exception { + EcompLoggerMetric result; + + // default test + result = EcompLoggerMetric.getInstance(); + } + + + @Test + public void testStartTimer() throws Exception { + EcompLoggerMetric testSubject; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.startTimer(); + } + + + @Test + public void testSetKeyRequestId() throws Exception { + EcompLoggerMetric testSubject; + String keyRequestId = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setKeyRequestId(keyRequestId); + } + + + @Test + public void testStopTimer() throws Exception { + EcompLoggerMetric testSubject; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.stopTimer(); + } + + + @Test + public void testSetAutoServerFQDN() throws Exception { + EcompLoggerMetric testSubject; + String serverFQDN = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setAutoServerFQDN(serverFQDN); + } + + + @Test + public void testSetAutoServerIPAddress() throws Exception { + EcompLoggerMetric testSubject; + String serverIPAddress = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setAutoServerIPAddress(serverIPAddress); + } + + + @Test + public void testSetInstanceUUID() throws Exception { + EcompLoggerMetric testSubject; + String instanceUUID = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setInstanceUUID(instanceUUID); + } + + + @Test + public void testSetOptProcessKey() throws Exception { + EcompLoggerMetric testSubject; + String processKey = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setOptProcessKey(processKey); + } + + + @Test + public void testSetOptAlertSeverity() throws Exception { + EcompLoggerMetric testSubject; + Severity alertSeverity = null; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setOptAlertSeverity(alertSeverity.OK); + } + + + @Test + public void testSetOptCustomField1() throws Exception { + EcompLoggerMetric testSubject; + String customField1 = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setOptCustomField1(customField1); + } + + + @Test + public void testSetOptCustomField2() throws Exception { + EcompLoggerMetric testSubject; + String customField2 = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setOptCustomField2(customField2); + } + + + @Test + public void testSetOptCustomField3() throws Exception { + EcompLoggerMetric testSubject; + String customField3 = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setOptCustomField3(customField3); + } + + + @Test + public void testSetOptCustomField4() throws Exception { + EcompLoggerMetric testSubject; + String customField4 = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setOptCustomField4(customField4); + } + + + @Test + public void testSetRemoteHost() throws Exception { + EcompLoggerMetric testSubject; + String remoteHost = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setRemoteHost(remoteHost); + } + + + @Test + public void testSetServiceName() throws Exception { + EcompLoggerMetric testSubject; + String serviceName = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setServiceName(serviceName); + } + + + @Test + public void testSetStatusCode() throws Exception { + EcompLoggerMetric testSubject; + String statusCode = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setStatusCode(statusCode); + } + + + @Test + public void testSetPartnerName() throws Exception { + EcompLoggerMetric testSubject; + String partnerName = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setPartnerName(partnerName); + } + + + @Test + public void testSetResponseCode() throws Exception { + EcompLoggerMetric testSubject; + int responseCode = 0; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setResponseCode(responseCode); + } + + + @Test + public void testSetResponseDesc() throws Exception { + EcompLoggerMetric testSubject; + String responseDesc = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setResponseDesc(responseDesc); + } + + + @Test + public void testSetOptServiceInstanceId() throws Exception { + EcompLoggerMetric testSubject; + String serviceInstanceId = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setOptServiceInstanceId(serviceInstanceId); + } + + + @Test + public void testSetOptClassName() throws Exception { + EcompLoggerMetric testSubject; + String className = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setOptClassName(className); + } + + + @Test + public void testSetTargetEntity() throws Exception { + EcompLoggerMetric testSubject; + String targetEntity = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setTargetEntity(targetEntity); + } + + + @Test + public void testSetTargetServiceName() throws Exception { + EcompLoggerMetric testSubject; + String targetServiceName = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setTargetServiceName(targetServiceName); + } + + + @Test + public void testSetTargetVirtualEntity() throws Exception { + EcompLoggerMetric testSubject; + String targetVirtualEntity = ""; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.setTargetVirtualEntity(targetVirtualEntity); + } + + + @Test + public void testClear() throws Exception { + EcompLoggerMetric testSubject; + EcompLoggerMetric result; + + // default test + testSubject = createTestSubject(); + result = testSubject.clear(); + } + + + @Test + public void testInitializeMandatoryFields() throws Exception { + EcompLoggerMetric testSubject; + + // default test + testSubject = createTestSubject(); + testSubject.initializeMandatoryFields(); + } +}
\ No newline at end of file diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/http/config/TimeoutsTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/http/config/TimeoutsTest.java new file mode 100644 index 0000000000..d7b14f64ee --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/http/config/TimeoutsTest.java @@ -0,0 +1,115 @@ +package org.openecomp.sdc.common.http.config; + +import javax.annotation.Generated; + +import org.junit.Assert; +import org.junit.Test; + +public class TimeoutsTest { + + private Timeouts createTestSubject() { + return new Timeouts(100, 200); + } + + + @Test + public void testGetConnectTimeoutMs() throws Exception { + Timeouts testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getConnectTimeoutMs(); + } + + + @Test + public void testSetConnectTimeoutMs() throws Exception { + Timeouts testSubject; + int connectTimeoutMs = 100; + + // default test + testSubject = createTestSubject(); + testSubject.setConnectTimeoutMs(connectTimeoutMs); + } + + + @Test + public void testGetReadTimeoutMs() throws Exception { + Timeouts testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getReadTimeoutMs(); + } + + + @Test + public void testSetReadTimeoutMs() throws Exception { + Timeouts testSubject; + int readTimeoutMs = 100; + + // default test + testSubject = createTestSubject(); + testSubject.setReadTimeoutMs(readTimeoutMs); + } + + + @Test + public void testGetConnectPoolTimeoutMs() throws Exception { + Timeouts testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getConnectPoolTimeoutMs(); + } + + + @Test + public void testSetConnectPoolTimeoutMs() throws Exception { + Timeouts testSubject; + int connectPoolTimeoutMs = 100; + + // default test + testSubject = createTestSubject(); + testSubject.setConnectPoolTimeoutMs(connectPoolTimeoutMs); + } + + + @Test + public void testHashCode() throws Exception { + Timeouts testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.hashCode(); + } + + + @Test + public void testEquals() throws Exception { + Timeouts testSubject; + Object obj = null; + boolean result; + + // test 1 + testSubject = createTestSubject(); + obj = null; + result = testSubject.equals(obj); + Assert.assertEquals(false, result); + } + + + @Test + public void testToString() throws Exception { + Timeouts testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } +}
\ No newline at end of file diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/util/SerializationUtilsTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/util/SerializationUtilsTest.java new file mode 100644 index 0000000000..f403bca574 --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/util/SerializationUtilsTest.java @@ -0,0 +1,42 @@ +package org.openecomp.sdc.common.util; + +import javax.annotation.Generated; + +import org.junit.Test; + +import fj.data.Either; + +public class SerializationUtilsTest { + + private SerializationUtils createTestSubject() { + return new SerializationUtils(); + } + + @Test + public void testSerialize() throws Exception { + Object object = null; + Either<byte[], Boolean> result; + + // default test + result = SerializationUtils.serialize(object); + } + + @Test + public void testDeserialize() throws Exception { + byte[] bytes = new byte[] { ' ' }; + Either<Object, Boolean> result; + + // default test + result = SerializationUtils.deserialize(bytes); + } + + @Test + public void testSerializeExt() throws Exception { + Object object = null; + Either<byte[], Boolean> result; + + // default test + result = SerializationUtils.serializeExt(object); + } + +}
\ No newline at end of file diff --git a/common-app-api/src/test/java/org/openecomp/sdc/common/util/ZipUtilTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/util/ZipUtilTest.java new file mode 100644 index 0000000000..314208554d --- /dev/null +++ b/common-app-api/src/test/java/org/openecomp/sdc/common/util/ZipUtilTest.java @@ -0,0 +1,50 @@ +package org.openecomp.sdc.common.util; + +import java.util.Map; +import java.util.zip.ZipInputStream; + +import javax.annotation.Generated; + +import org.junit.Test; + +public class ZipUtilTest { + + // private ZipUtil createTestSubject() { + // return new ZipUtil(); + // } + + @Test + public void testReadZip() throws Exception { + byte[] zipAsBytes = new byte[] { ' ' }; + Map<String, byte[]> result; + + // default test + result = ZipUtil.readZip(zipAsBytes); + } + + @Test + public void testMain() throws Exception { + String[] args = new String[] { "" }; + + // default test + ZipUtil.main(args); + } + + @Test + public void testZipBytes() throws Exception { + byte[] input = new byte[] { ' ' }; + byte[] result; + + // default test + result = ZipUtil.zipBytes(input); + } + + @Test + public void testUnzip() throws Exception { + byte[] zipped = new byte[] { ' ' }; + byte[] result; + + // default test + result = ZipUtil.unzip(zipped); + } +}
\ No newline at end of file |