summaryrefslogtreecommitdiffstats
path: root/common-app-api
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2021-03-01 20:58:10 +0000
committerVasyl Razinkov <vasyl.razinkov@est.tech>2021-03-01 21:00:16 +0000
commitdfc9cdee69426b48d683e119dda9fae9154e6fde (patch)
tree70e81d301bcc21b1d604b9f301176c9677dcb33d /common-app-api
parent97d15f764138e0d49963f168d339fc1637cc5376 (diff)
Improve test coverage
- remove unused code - use lombok Change-Id: I8c52584249347c7ca2102022457225401f95b9a5 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3490
Diffstat (limited to 'common-app-api')
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckInfo.java15
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorConfiguration.java3
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java17
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/api/HealthCheckInfoTest.java7
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/config/EcompErrorConfigurationTest.java10
-rw-r--r--common-app-api/src/test/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsvTest.java8
6 files changed, 1 insertions, 59 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckInfo.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckInfo.java
index 53cb6654ba..fb1938fb9a 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckInfo.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckInfo.java
@@ -20,10 +20,6 @@
package org.openecomp.sdc.common.api;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
-
-import java.lang.reflect.Type;
import java.util.List;
public class HealthCheckInfo {
@@ -97,11 +93,6 @@ public class HealthCheckInfo {
this.description = description;
}
- /*public enum HealthCheckComponent {
- FE, BE, JANUSGRAPH, DE, ON_BOARDING, CASSANDRA, DCAE,
- CAS, ZU;//Amdocs components
- }*/
-
public enum HealthCheckStatus {
UP, DOWN, UNKNOWN;
}
@@ -113,10 +104,4 @@ public class HealthCheckInfo {
+ componentsInfo + "]";
}
- public static void main(String[] args) {
- String des = "[{healthCheckComponent=BE4, healthCheckStatus=UP, version=0.0.1-SNAPSHOT, description=OK}, {healthCheckComponent=BE, healthCheckStatus=UP, version=1710.0.0-SNAPSHOT, description=OK}, {healthCheckComponent=BE5, healthCheckStatus=UP, version=2.1.9, description=OK}]";
- Type listType = new TypeToken<List<HealthCheckInfo>>(){}.getType();
- List<HealthCheckInfo> componentsInfo = new Gson().fromJson(des.toString(), listType);
- System.out.println(componentsInfo.toString());
- }
}
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorConfiguration.java b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorConfiguration.java
index b44ceea678..b9bdd88e7d 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorConfiguration.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/config/EcompErrorConfiguration.java
@@ -156,7 +156,4 @@ public class EcompErrorConfiguration extends BasicConfiguration {
I, W, E, F;
}
- public static void main(String[] args) {
- System.out.println(Arrays.asList(EcompErrorType.values()));
- }
}
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java b/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java
index b9c0d77be8..5470fb9d9d 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java
@@ -43,23 +43,6 @@ public class GenerateEcompErrorsCsv {
private static String NEW_LINE = System.getProperty("line.separator");
- private static void usage() {
- System.out.println("java org.openecomp.sdc.common.config.generation.GenerateEcompErrorsCsv <target folder>");
- System.exit(1);
- }
-
- public static void main(String[] args) {
-
- String targetFolder = "target";
- if (args.length > 1) {
- targetFolder = args[0];
- }
-
- GenerateEcompErrorsCsv ecompErrorsCsv = new GenerateEcompErrorsCsv();
-
- ecompErrorsCsv.generateEcompErrorsCsvFile(targetFolder, true);
- }
-
public static class EcompErrorRow {
String errorName;
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 688a14082f..9e0757d4de 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
@@ -111,11 +111,4 @@ public class HealthCheckInfoTest {
result = testSubject.toString();
}
- @Test
- public void testMain() throws Exception {
- String[] args = new String[] { "" };
-
- // default test
- HealthCheckInfo.main(args);
- }
}
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
index e2a9258ef2..5c7865e879 100644
--- 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
@@ -92,12 +92,4 @@ public class EcompErrorConfigurationTest {
assertEquals(ecompErrorConfiguration.getErrors(), errors);
}
- @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/generation/GenerateEcompErrorsCsvTest.java b/common-app-api/src/test/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsvTest.java
index c56dc964f6..e9fe964dc1 100644
--- 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
@@ -41,12 +41,4 @@ public class GenerateEcompErrorsCsvTest {
result = testSubject.generateEcompErrorsCsvFile(targetFolder, addTimeToFileName);
}
-
- @Test
- public void testMain() throws Exception {
- String[] args = new String[] { "" };
-
- // default test
- GenerateEcompErrorsCsv.main(args);
- }
}