- private QNameModule bazModule;
-
- private QName outerContainer;
-
- private QName myContainer1;
- private QName myKeyedList;
- private QName myKeyLeaf;
- private QName myLeafInList1;
- private QName myLeafInList2;
- private QName myLeaf1;
- private QName myLeafList;
-
- private QName myContainer2;
- private QName innerContainer;
- private QName myLeaf2;
- private QName myLeaf3;
- private QName myChoice;
- private QName myLeafInCase2;
-
- private QName myContainer3;
- private QName myDoublyKeyedList;
- private QName myFirstKeyLeaf;
- private QName mySecondKeyLeaf;
- private QName myLeafInList3;
-
- @Before
- public void setup() throws URISyntaxException, ParseException {
- bazModule = QNameModule.create(new URI("baz-namespace"), SimpleDateFormatUtil.getRevisionFormat().parse
- ("1970-01-01"));
-
- outerContainer = QName.create(bazModule, "outer-container");
-
- myContainer1 = QName.create(bazModule, "my-container-1");
- myKeyedList = QName.create(bazModule, "my-keyed-list");
- myKeyLeaf = QName.create(bazModule, "my-key-leaf");
- myLeafInList1 = QName.create(bazModule, "my-leaf-in-list-1");
- myLeafInList2 = QName.create(bazModule, "my-leaf-in-list-2");
- myLeaf1 = QName.create(bazModule, "my-leaf-1");
- myLeafList = QName.create(bazModule, "my-leaf-list");
-
- myContainer2 = QName.create(bazModule, "my-container-2");
- innerContainer = QName.create(bazModule, "inner-container");
- myLeaf2 = QName.create(bazModule, "my-leaf-2");
- myLeaf3 = QName.create(bazModule, "my-leaf-3");
- myChoice = QName.create(bazModule, "my-choice");
- myLeafInCase2 = QName.create(bazModule, "my-leaf-in-case-2");
-
- myContainer3 = QName.create(bazModule, "my-container-3");
- myDoublyKeyedList = QName.create(bazModule, "my-doubly-keyed-list");
- myFirstKeyLeaf = QName.create(bazModule, "my-first-key-leaf");
- mySecondKeyLeaf = QName.create(bazModule, "my-second-key-leaf");
- myLeafInList3 = QName.create(bazModule, "my-leaf-in-list-3");
+ private static final QNameModule FOO_MODULE = QNameModule.create(XMLNamespace.of("foo-namespace"));
+ private static final QName PARENT_CONTAINER = QName.create(FOO_MODULE, "parent-container");
+
+ private static final QNameModule BAZ_MODULE = QNameModule.create(XMLNamespace.of("baz-namespace"));
+ private static final QName OUTER_CONTAINER = QName.create(BAZ_MODULE, "outer-container");
+
+ private static final QName MY_CONTAINER_1 = QName.create(BAZ_MODULE, "my-container-1");
+ private static final QName MY_KEYED_LIST = QName.create(BAZ_MODULE, "my-keyed-list");
+ private static final QName MY_KEY_LEAF = QName.create(BAZ_MODULE, "my-key-leaf");
+ private static final QName MY_LEAF_IN_LIST_1 = QName.create(BAZ_MODULE, "my-leaf-in-list-1");
+ private static final QName MY_LEAF_IN_LIST_2 = QName.create(BAZ_MODULE, "my-leaf-in-list-2");
+ private static final QName MY_LEAF_1 = QName.create(BAZ_MODULE, "my-leaf-1");
+ private static final QName MY_LEAFLIST = QName.create(BAZ_MODULE, "my-leaf-list");
+
+ private static final QName MY_CONTAINER_2 = QName.create(BAZ_MODULE, "my-container-2");
+ private static final QName INNER_CONTAINER = QName.create(BAZ_MODULE, "inner-container");
+ private static final QName MY_LEAF_2 = QName.create(BAZ_MODULE, "my-leaf-2");
+ private static final QName MY_LEAF_3 = QName.create(BAZ_MODULE, "my-leaf-3");
+ private static final QName MY_CHOICE = QName.create(BAZ_MODULE, "my-choice");
+ private static final QName MY_LEAF_IN_CASE_2 = QName.create(BAZ_MODULE, "my-leaf-in-case-2");
+
+ private static final QName MY_CONTAINER_3 = QName.create(BAZ_MODULE, "my-container-3");
+ private static final QName MY_DOUBLY_KEYED_LIST = QName.create(BAZ_MODULE, "my-doubly-keyed-list");
+ private static final QName MY_FIRST_KEY_LEAF = QName.create(BAZ_MODULE, "my-first-key-leaf");
+ private static final QName MY_SECOND_KEY_LEAF = QName.create(BAZ_MODULE, "my-second-key-leaf");
+ private static final QName MY_LEAF_IN_LIST_3 = QName.create(BAZ_MODULE, "my-leaf-in-list-3");
+
+ private static EffectiveModelContext schemaContext;
+ private static ContainerSchemaNode outerContainerSchema;
+ private static ContainerSchemaNode parentContainerSchema;
+
+ @BeforeClass
+ public static void setup() {
+ schemaContext = YangParserTestUtils.parseYangResourceDirectory("/");
+ parentContainerSchema = (ContainerSchemaNode) SchemaContextUtil.findNodeInSchemaContext(schemaContext,
+ ImmutableList.of(PARENT_CONTAINER));
+ outerContainerSchema = (ContainerSchemaNode) SchemaContextUtil.findNodeInSchemaContext(schemaContext,
+ ImmutableList.of(OUTER_CONTAINER));