summaryrefslogtreecommitdiffstats
path: root/asdctool/src/main/java/org
diff options
context:
space:
mode:
authorFrancis Toth <francis.toth@yoppworks.com>2020-07-07 07:24:48 -0400
committerFrancis Toth <francis.toth@yoppworks.com>2020-07-07 07:31:31 -0400
commit0132d3637a889f84897d6a08688b20ff6f606041 (patch)
treef2e7f5f4180b29b28288f4ef93f0fb9a66072e6b /asdctool/src/main/java/org
parentde0df941356d809c16f8851c2f3f72f61c4ea928 (diff)
Add test contracts for ValidatorExecutor and TopologyTemplateValidatorExecutor
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I10f0de565588e0bc7cd0f47ba7f714eab3f1f7f7 Issue-ID: SDC-2499
Diffstat (limited to 'asdctool/src/main/java/org')
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceValidatorExecutor.java3
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/TopologyTemplateValidatorExecutor.java17
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/VfValidatorExecutor.java3
3 files changed, 7 insertions, 16 deletions
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceValidatorExecutor.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceValidatorExecutor.java
index ff27b667d5..27bcd1f60d 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceValidatorExecutor.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/ServiceValidatorExecutor.java
@@ -39,8 +39,7 @@ public class ServiceValidatorExecutor extends TopologyTemplateValidatorExecutor
@Autowired(required = false)
public ServiceValidatorExecutor(JanusGraphDao janusGraphDao) {
- super(janusGraphDao);
- setName("SERVICE_VALIDATOR");
+ super(janusGraphDao, "SERVICE_VALIDATOR");
}
@Override
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/TopologyTemplateValidatorExecutor.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/TopologyTemplateValidatorExecutor.java
index 9ba2f5ab46..95a9fce9af 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/TopologyTemplateValidatorExecutor.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/TopologyTemplateValidatorExecutor.java
@@ -27,6 +27,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import lombok.Getter;
import org.openecomp.sdc.asdctool.impl.validator.report.Report;
import org.openecomp.sdc.asdctool.impl.validator.report.ReportFile.TXTFile;
import org.openecomp.sdc.asdctool.impl.validator.tasks.TopologyTemplateValidationTask;
@@ -39,29 +40,21 @@ import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
import org.openecomp.sdc.common.log.wrappers.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
public class TopologyTemplateValidatorExecutor {
private static final Logger log = Logger.getLogger(VfValidatorExecutor.class);
- protected JanusGraphDao janusGraphDao;
+ private final JanusGraphDao janusGraphDao;
- protected String name;
+ @Getter
+ private final String name;
- @Autowired
- public TopologyTemplateValidatorExecutor(JanusGraphDao janusGraphDao) {
+ public TopologyTemplateValidatorExecutor(JanusGraphDao janusGraphDao, String name) {
this.janusGraphDao = janusGraphDao;
- }
-
- public void setName(String name) {
this.name = name;
}
- public String getName() {
- return name;
- }
-
protected List<GraphVertex> getVerticesToValidate(ComponentTypeEnum type) {
Map<GraphPropertyEnum, Object> props = new EnumMap<>(GraphPropertyEnum.class);
props.put(GraphPropertyEnum.COMPONENT_TYPE, type.name());
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/VfValidatorExecutor.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/VfValidatorExecutor.java
index 4729e63c16..f8aaf5480d 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/VfValidatorExecutor.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executor/VfValidatorExecutor.java
@@ -36,9 +36,8 @@ public class VfValidatorExecutor extends TopologyTemplateValidatorExecutor imple
@Autowired(required = false)
public VfValidatorExecutor(List<VfValidationTask> tasks, JanusGraphDao janusGraphDao) {
- super(janusGraphDao);
+ super(janusGraphDao, "BASIC_VF_VALIDATOR");
this.tasks = tasks;
- setName("BASIC_VF_VALIDATOR");
}
@Override