aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorFactory.java
diff options
context:
space:
mode:
authorPawel Kadlubanski <pawel.kadlubanski@nokia.com>2018-05-23 16:33:20 +0200
committerPawel Kadlubanski <pawel.kadlubanski@nokia.com>2018-05-23 16:36:05 +0200
commitbbae7a7e35c5ffa7a5a309ad62659663b9205974 (patch)
tree5b773e262d38ffe87cc7e6ba24a34e8880e20d56 /test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorFactory.java
parent8cf007dd575a7e8381fd78b831b57ed1f03804f9 (diff)
Update in pnfsimulator code.
Correction problem with license. Issue-ID: INT-458 Change-Id: I961133ff5695b241a8c82c87a0e1aa800e79d6d8 Signed-off-by: Pawel Kadlubanski <pawel.kadlubanski@nokia.com>
Diffstat (limited to 'test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorFactory.java')
-rw-r--r--test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorFactory.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorFactory.java b/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorFactory.java
index 9f3d48ab3..e3a003831 100644
--- a/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorFactory.java
+++ b/test/mocks/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/SimulatorFactory.java
@@ -1,4 +1,4 @@
-/*
+/*-
* ============LICENSE_START=======================================================
* org.onap.integration
* ================================================================================
@@ -37,19 +37,17 @@ import org.onap.pnfsimulator.simulator.validation.ValidationException;
public class SimulatorFactory {
private MessageProvider messageProvider;
- private ParamsValidator paramsValidator;
- public SimulatorFactory(MessageProvider messageProvider, ParamsValidator paramsValidator) {
+ public SimulatorFactory(MessageProvider messageProvider) {
this.messageProvider = messageProvider;
- this.paramsValidator = paramsValidator;
}
public Simulator create(String vesServerUrl, String configFilePath) throws IOException, ValidationException {
String configJson = FileUtils.readFileToString(new File(configFilePath), StandardCharsets.UTF_8);
JSONObject configObject = new JSONObject(configJson);
+ ParamsValidator.forObject(configObject).validate();
- paramsValidator.validate(configObject);
Duration duration = Duration.ofSeconds(parseJsonField(configObject, TEST_DURATION));
Duration interval = Duration.ofSeconds(parseJsonField(configObject, MESSAGE_INTERVAL));
JSONObject messageBody = messageProvider.createMessage(configObject);