summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/ForwardingPathTestUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/test/java/org/openecomp/sdc/be/components/path/ForwardingPathTestUtils.java')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/path/ForwardingPathTestUtils.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/ForwardingPathTestUtils.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/ForwardingPathTestUtils.java
new file mode 100644
index 0000000000..9ab9ffd788
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/ForwardingPathTestUtils.java
@@ -0,0 +1,23 @@
+package org.openecomp.sdc.be.components.path;
+
+import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.ForwardingPathElementDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.ListDataDefinition;
+
+public interface ForwardingPathTestUtils {
+
+ default ForwardingPathDataDefinition createPath(String pathName, String protocol, String ports, String uniqueId){
+ ForwardingPathDataDefinition forwardingPath = new ForwardingPathDataDefinition(pathName);
+ forwardingPath.setProtocol(protocol);
+ forwardingPath.setDestinationPortNumber(ports);
+ forwardingPath.setUniqueId(uniqueId);
+ ListDataDefinition<ForwardingPathElementDataDefinition> forwardingPathElementListDataDefinition = new ListDataDefinition<>();
+ String nodeA = "nodeA";
+ forwardingPathElementListDataDefinition.add(new ForwardingPathElementDataDefinition(nodeA, "nodeB", "nodeAcpType", "nodeBcpType", "nodeDcpName", "nodeBcpName"));
+ forwardingPathElementListDataDefinition.add(new ForwardingPathElementDataDefinition("nodeB", "nodeC", "nodeBcpType", "nodeCcpType", "nodeDcpName", "nodeBcpName"));
+ forwardingPathElementListDataDefinition.add(new ForwardingPathElementDataDefinition("nodeC", "nodeD", "nodeCcpType", "nodeDcpType", "nodeDcpName", "nodeBcpName"));
+ forwardingPath.setPathElements(forwardingPathElementListDataDefinition);
+
+ return forwardingPath;
+ }
+}