aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-03-27 18:19:32 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-03-27 18:22:54 +0200
commit540fff37e161d693e8f9168a3ddac1ff4866c33a (patch)
treebd373715f8ed763bfc5eb5599795263bd7d104c1 /src/test/java
parent3e84a919dbda602eaeb261425f0a69ec6bbd9c5f (diff)
Add blueprint input
Add blueprint json input support for DCAE call Issue-ID: CLAMP-142 Change-Id: I52657ff7ead38681eae2744a30271f0a1b825bb6 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java b/src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java
index a7ab94c57..25daf01f3 100644
--- a/src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java
+++ b/src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java
@@ -28,6 +28,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
+import java.util.Arrays;
import org.junit.Before;
import org.junit.Test;
@@ -84,6 +85,17 @@ public class ModelPropertiesTest {
tca.getTcaItem().getTcaThresholds().get(1).getFieldPath());
assertEquals("GREATER_OR_EQUAL", tca.getTcaItem().getTcaThresholds().get(1).getOperator());
assertEquals(Integer.valueOf(123), tca.getTcaItem().getTcaThresholds().get(1).getThreshold());
+ // Test global prop
+ assertEquals("vnfRecipe", prop.getGlobal().getActionSet());
+ assertEquals("4cc5b45a-1f63-4194-8100-cd8e14248c92", prop.getGlobal().getService());
+ assertTrue(Arrays.equals(new String[] {
+ "023a3f0d-1161-45ff-b4cf-8918a8ccf3ad"
+ }, prop.getGlobal().getResourceVf().toArray()));
+ assertTrue(Arrays.equals(new String[] {
+ "SNDGCA64", "ALPRGAED", "LSLEILAA", "MDTWNJC1"
+ }, prop.getGlobal().getLocation().toArray()));
+ assertEquals("value1", prop.getGlobal().getDeployParameters().get("input1").asText());
+ assertEquals("value2", prop.getGlobal().getDeployParameters().get("input2").asText());
}
@Test
@@ -108,6 +120,17 @@ public class ModelPropertiesTest {
assertTrue(holmes.isFound());
assertEquals("configPolicy1", holmes.getConfigPolicyName());
assertEquals("blabla", holmes.getCorrelationLogic());
+ // Test global prop
+ assertEquals("vnfRecipe", prop.getGlobal().getActionSet());
+ assertEquals("4cc5b45a-1f63-4194-8100-cd8e14248c92", prop.getGlobal().getService());
+ assertTrue(Arrays.equals(new String[] {
+ "f5213e3a-9191-4362-93b5-b67f8d770e44"
+ }, prop.getGlobal().getResourceVf().toArray()));
+ assertTrue(Arrays.equals(new String[] {
+ "SNDGCA64", "ALPRGAED", "LSLEILAA", "MDTWNJC1"
+ }, prop.getGlobal().getLocation().toArray()));
+ assertEquals("value1", prop.getGlobal().getDeployParameters().get("input1").asText());
+ assertEquals("value2", prop.getGlobal().getDeployParameters().get("input2").asText());
}
@Test