aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/test/java/org
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@est.tech>2021-01-06 20:44:53 +0000
committerGerrit Code Review <gerrit@onap.org>2021-01-06 20:44:53 +0000
commitd05021ebfc7a7f57cb88a5e380b403118ceeaa13 (patch)
tree9669dfb7faf166301c6b7a848e93e01bbbb4249f /services/services-engine/src/test/java/org
parent65450784b137f50442fdf170a2358c3953560d1d (diff)
parentf9455834e7e014fed6e941184ab80eb9fe91d89f (diff)
Merge "Changed identifiers to concept identifiers"
Diffstat (limited to 'services/services-engine/src/test/java/org')
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/ApexMainTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/ApexMainTest.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/ApexMainTest.java
index 122e47bb1..68472d4de 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/ApexMainTest.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/ApexMainTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020-2021 Nordix Foundation.
* Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -37,7 +37,7 @@ import org.junit.After;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.service.parameters.ApexParameters;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the ApexMain class.
@@ -146,9 +146,9 @@ public class ApexMainTest {
public void testCorrectParametersWithMultiplePolicies() throws ApexException {
OutputStream outContent = new ByteArrayOutputStream();
System.setOut(new PrintStream(outContent));
- Map<ToscaPolicyIdentifier, String[]> argsMap = new HashMap<ToscaPolicyIdentifier, String[]>();
+ Map<ToscaConceptIdentifier, String[]> argsMap = new HashMap<ToscaConceptIdentifier, String[]>();
String[] args = {"-p", "src/test/resources/parameters/correctParams.json"};
- argsMap.put(new ToscaPolicyIdentifier("id1", "v1"), args);
+ argsMap.put(new ToscaConceptIdentifier("id1", "v1"), args);
final ApexMain apexMain = new ApexMain(argsMap);
ApexParameters apexParam = (ApexParameters) apexMain.getApexParametersMap().values().toArray()[0];
assertEquals("MyApexEngine", apexParam.getEngineServiceParameters().getName());
@@ -161,10 +161,10 @@ public class ApexMainTest {
public void testInCorrectParametersWithMultiplePolicies() throws ApexException {
OutputStream outContent = new ByteArrayOutputStream();
System.setOut(new PrintStream(outContent));
- Map<ToscaPolicyIdentifier, String[]> argsMap = new HashMap<ToscaPolicyIdentifier, String[]>();
+ Map<ToscaConceptIdentifier, String[]> argsMap = new HashMap<ToscaConceptIdentifier, String[]>();
String[] args = {"-p", "src/test/resources/parameters/correctParams.json"};
- argsMap.put(new ToscaPolicyIdentifier("id1", "v1"), args);
- argsMap.put(new ToscaPolicyIdentifier("id2", "v2"), args);
+ argsMap.put(new ToscaConceptIdentifier("id1", "v1"), args);
+ argsMap.put(new ToscaConceptIdentifier("id2", "v2"), args);
final ApexMain apexMain = new ApexMain(argsMap);
ApexParameters apexParam = (ApexParameters) apexMain.getApexParametersMap().values().toArray()[0];
assertEquals("MyApexEngine", apexParam.getEngineServiceParameters().getName());
@@ -179,9 +179,9 @@ public class ApexMainTest {
public void testInvalidArgsWithMultiplePolicies() throws ApexException {
OutputStream outContent = new ByteArrayOutputStream();
System.setOut(new PrintStream(outContent));
- Map<ToscaPolicyIdentifier, String[]> argsMap = new HashMap<ToscaPolicyIdentifier, String[]>();
+ Map<ToscaConceptIdentifier, String[]> argsMap = new HashMap<ToscaConceptIdentifier, String[]>();
String[] args = {"-c", "file1", "-m", "file2"};
- argsMap.put(new ToscaPolicyIdentifier("id1", "v1"), args);
+ argsMap.put(new ToscaConceptIdentifier("id1", "v1"), args);
final ApexMain apexMain = new ApexMain(argsMap);
final String outString = outContent.toString();
apexMain.shutdown();