summaryrefslogtreecommitdiffstats
path: root/mod/bpgenerator/src/test/java
diff options
context:
space:
mode:
authorTomasz Wrobel <tomasz.wrobel@nokia.com>2020-09-30 08:59:39 +0200
committerTomasz Wrobel <tomasz.wrobel@nokia.com>2020-10-01 13:34:19 +0200
commit43a65d7605b852140a12f1398a152dea33112d87 (patch)
tree645c867c140d241e85dd5a93b02efe3f4685f214 /mod/bpgenerator/src/test/java
parent04f13ef80c6e79d8c0b7b3fa1faeeaa0def1584e (diff)
Add useExisting property to Dmaap Feed Node in Blueprint-Generator
Issue-ID: DCAEGEN2-2460 Signed-off-by: Tomasz Wrobel <tomasz.wrobel@nokia.com> Change-Id: Ie170ed503be3e775b05bd3acf51c19d245b85c38
Diffstat (limited to 'mod/bpgenerator/src/test/java')
-rw-r--r--mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/models/dmaapbp/DmaapNodeTest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/models/dmaapbp/DmaapNodeTest.java b/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/models/dmaapbp/DmaapNodeTest.java
index 6936393..83419e5 100644
--- a/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/models/dmaapbp/DmaapNodeTest.java
+++ b/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/models/dmaapbp/DmaapNodeTest.java
@@ -21,6 +21,8 @@ package org.onap.blueprintgenerator.models.dmaapbp;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
import static org.onap.blueprintgenerator.models.blueprint.BpConstants.CONTENERIZED_SERVICE_COMPONENT_USING_DMAAP;
@@ -147,6 +149,16 @@ public class DmaapNodeTest {
}
@Test
+ public void feedNodePropertiesShouldHaveUseExistingField() {
+ ComponentSpec componentSpec = getSpiedComponentSpecWithoutRelationships();
+
+ DmaapNode dmaapNode = new DmaapNode();
+ dmaapNode.createFeedNode(componentSpec, new TreeMap<>() ,"");
+
+ assertTrue(dmaapNode.getProperties().getUseExisting());
+ }
+
+ @Test
public void createTopicNodeShouldSetTopicNodeType() {
ComponentSpec componentSpec = getSpiedComponentSpecWithoutRelationships();
@@ -157,6 +169,16 @@ public class DmaapNodeTest {
assertEquals(TOPIC, dmaapNode.getType());
}
+ @Test
+ public void topicNodePropertiesShouldNotHaveUseExistingField() {
+ ComponentSpec componentSpec = getSpiedComponentSpecWithoutRelationships();
+
+ DmaapNode dmaapNode = new DmaapNode();
+ dmaapNode.createTopicNode(componentSpec, new TreeMap<>() ,"");
+
+ assertNull(dmaapNode.getProperties().getUseExisting());
+ }
+
private Publishes[] createSamplePublishes(String type) {
Publishes publishes = new Publishes();