diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-08-30 09:37:29 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-08-31 19:23:41 +0100 |
commit | f32508381ce0b555fc14978cbaa458aa4e2d91c5 (patch) | |
tree | 1cab66e5372b6467f288ae1351ce836e4eba2d03 /plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test | |
parent | 052038c7a7e0b385462b3b653b7d06094d472df3 (diff) |
Use parameter service in apex
Switch parameter handling in apex to use
the ONAP PF common parameter service
Change-Id: Id318d19c726b18b1a69c630fa81ca7d695355e9c
Issue-ID: POLICY-954
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test')
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/TestYamlEventProtocol.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/TestYamlEventProtocol.java index 40196eb8a..c5f6cb781 100644 --- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/TestYamlEventProtocol.java +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/TestYamlEventProtocol.java @@ -37,7 +37,6 @@ import org.onap.policy.apex.context.parameters.SchemaParameters; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; import org.onap.policy.apex.model.basicmodel.service.ModelService; -import org.onap.policy.apex.model.basicmodel.service.ParameterService; import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema; import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas; import org.onap.policy.apex.model.eventmodel.concepts.AxEvent; @@ -48,13 +47,14 @@ import org.onap.policy.apex.service.engine.event.ApexEvent; import org.onap.policy.apex.service.engine.event.ApexEventException; import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.consumer.HeaderDelimitedTextBlockReader; import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.consumer.TextBlock; +import org.onap.policy.common.parameters.ParameterService; public class TestYamlEventProtocol { @BeforeClass public static void registerTestEventsAndSchemas() throws IOException { SchemaParameters schemaParameters = new SchemaParameters(); schemaParameters.getSchemaHelperParameterMap().put("JAVA", new JavaSchemaHelperParameters()); - ParameterService.registerParameters(SchemaParameters.class, schemaParameters); + ParameterService.register(schemaParameters, true); AxContextSchemas schemas = new AxContextSchemas(); @@ -199,6 +199,7 @@ public class TestYamlEventProtocol { @AfterClass public static void unregisterTestEventsAndSchemas() { ModelService.clear(); + ParameterService.clear(); } @Test diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/TestYamlPluginStability.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/TestYamlPluginStability.java index 126a01df7..57b4b72d6 100644 --- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/TestYamlPluginStability.java +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/test/java/org/onap/policy/apex/plugins/event/protocol/yaml/TestYamlPluginStability.java @@ -34,7 +34,6 @@ import org.onap.policy.apex.context.parameters.SchemaParameters; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; import org.onap.policy.apex.model.basicmodel.service.ModelService; -import org.onap.policy.apex.model.basicmodel.service.ParameterService; import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema; import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas; import org.onap.policy.apex.model.eventmodel.concepts.AxEvent; @@ -43,6 +42,7 @@ import org.onap.policy.apex.model.eventmodel.concepts.AxField; import org.onap.policy.apex.service.engine.event.ApexEvent; import org.onap.policy.apex.service.engine.event.ApexEventException; import org.onap.policy.apex.service.engine.event.ApexEventRuntimeException; +import org.onap.policy.common.parameters.ParameterService; public class TestYamlPluginStability { static AxEvent testEvent; @@ -51,7 +51,7 @@ public class TestYamlPluginStability { public static void registerTestEventsAndSchemas() throws IOException { SchemaParameters schemaParameters = new SchemaParameters(); schemaParameters.getSchemaHelperParameterMap().put("JAVA", new JavaSchemaHelperParameters()); - ParameterService.registerParameters(SchemaParameters.class, schemaParameters); + ParameterService.register(schemaParameters); AxContextSchemas schemas = new AxContextSchemas(); @@ -89,6 +89,7 @@ public class TestYamlPluginStability { @AfterClass public static void unregisterTestEventsAndSchemas() { ModelService.clear(); + ParameterService.clear(); } @Test |