Skip to content

Commit

Permalink
Add tests for BindingObjects with List and LeafLists
Browse files Browse the repository at this point in the history
These tests cover scenarios for ordered and unordered lists and leaf-lists,
including nested lists within containers.The tests also verify the correct
behavior of user, system-ordered and un-keyed lists.

Signed-off-by: Peter Suna <[email protected]>
Change-Id: Id9e85133fe767a22953970e96f9eb6b26a1bd068
  • Loading branch information
PeterSuna authored and rovarga committed Apr 26, 2023
1 parent 0905965 commit 1c22875
Show file tree
Hide file tree
Showing 2 changed files with 572 additions and 0 deletions.
121 changes: 121 additions & 0 deletions binding/mdsal-binding-test-model/src/main/yang/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
module equals {
yang-version 1.1;
namespace "urn:yang.equals";
prefix "eq";

revision "2023-04-24";

container root {
list root-list-by-user {
key "name";
description "List<>";
ordered-by user;
leaf name {
type string;
}
leaf type {
type string;
mandatory true;
}
leaf-list list-by-user-leaf-list-by-user {
description "List<List<>>";
type string;
ordered-by user;
}
leaf-list list-by-user-leaf-list-by-system {
description "List<Set<>>";
type string;
}
list nested-list-by-user {
description "List<List<>>";
key "name";
ordered-by user;
leaf name {
type string;
}
leaf type {
type string;
mandatory true;
}
list double-nested-list-no-key {
description "List<List<List<>>>";
leaf name {
type string;
}
leaf type {
type string;
mandatory true;
}
}
}
list nested-list-no-key {
description "List<List<>>";
leaf name {
type string;
}
leaf type {
type string;
mandatory true;
}
list double-nested-mixed-list {
description "List<List<Map<>>>";
key "name";
leaf name {
type string;
}
leaf type {
type string;
mandatory true;
}
}
}
}

list root-list-by-system {
description "Map<>";
key "name";
leaf name {
type string;
}
leaf type {
type string;
mandatory true;
}
container nested-list-container {
leaf-list list-by-system-leaf-list-by-user {
description "Map<List<>>";
type string;
ordered-by user;
}
leaf-list list-by-system-leaf-list-by-system {
description "Map<Set<>>";
type string;
}
list nested-list-by-system {
description "Map<Map<>>";
key "name";
leaf name {
type string;
}
leaf type {
type string;
mandatory true;
}
container double-nested-list-container {
list double-nested-list-by-system {
description "Map<Map<Map<>>>";
key "name";
leaf name {
type string;
}
leaf type {
type string;
mandatory true;
}
}
}
}
}
}
}
}
Loading

0 comments on commit 1c22875

Please sign in to comment.