summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test/resources
diff options
context:
space:
mode:
authorLena Peuker <PeukerL@telekom.de>2022-11-29 15:38:00 +0100
committerLena Peuker <PeukerL@telekom.de>2022-12-12 14:19:08 +0100
commite7f24d3f2f239e6bdc14a78eb01d07525650a960 (patch)
tree23fafc2c30f2dc1e862cbf978d4653ab0a48b1fc /cps-service/src/test/resources
parentf20b49940bb4dd381b689dfedbddbe80cb3968f7 (diff)
Fix DataNodeBuilder for ChoiceNodes
Fix implemented to handle YangChoiceNode in right format Issue-ID: CPS-1352 Signed-off-by: Lena Peuker <PeukerL@telekom.de> Change-Id: I48d433bac96cfc647bc31c82817870995bace860
Diffstat (limited to 'cps-service/src/test/resources')
-rw-r--r--cps-service/src/test/resources/data-with-choice-node.json8
-rw-r--r--cps-service/src/test/resources/yang-with-choice-node.yang27
2 files changed, 35 insertions, 0 deletions
diff --git a/cps-service/src/test/resources/data-with-choice-node.json b/cps-service/src/test/resources/data-with-choice-node.json
new file mode 100644
index 0000000000..5f81ed8ed7
--- /dev/null
+++ b/cps-service/src/test/resources/data-with-choice-node.json
@@ -0,0 +1,8 @@
+{
+ "container-with-choice-leaves": {
+ "leaf-1": "test",
+ "choice-case1-leaf-a": "test",
+ "choice-case1-leaf-b": "test"
+ }
+}
+
diff --git a/cps-service/src/test/resources/yang-with-choice-node.yang b/cps-service/src/test/resources/yang-with-choice-node.yang
new file mode 100644
index 0000000000..55c0bfbe62
--- /dev/null
+++ b/cps-service/src/test/resources/yang-with-choice-node.yang
@@ -0,0 +1,27 @@
+module yang-with-choice-node {
+ yang-version 1.1;
+ namespace "org:onap:cps:test:yang-with-choice-node";
+ prefix "yang-with-choice-node";
+
+ container container-with-choice-leaves {
+ leaf leaf-1 {
+ type string;
+ }
+
+ choice choicenode {
+ case case-1 {
+ leaf choice-case1-leaf-a {
+ type string;
+ }
+ leaf choice-case1-leaf-b {
+ type string;
+ }
+ }
+ case case-2 {
+ leaf choice-case2-leaf-a {
+ type string;
+ }
+ }
+ }
+ }
+}