This is a simple document, inline it directly in tests.
Change-Id: Ib0bbc244f9b599c1cdc5f4073fe0c361041cae16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
@Test
void moduleSubContainerDataPostTest() {
- final var body = new XmlChildBody(
- XmlChildBodyTest.class.getResourceAsStream("/instanceidentifier/xml/xml_sub_container.xml"));
+ final var body = new XmlChildBody(stringInputStream("""
+ <cont1 xmlns="instance:identifier:module">
+ <lflst11 xmlns="augment:module:leaf:list">lflst11_1</lflst11>
+ <lflst11 xmlns="augment:module:leaf:list">lflst11_2</lflst11>
+ <lflst11 xmlns="augment:module:leaf:list">lflst11_3</lflst11>
+ <lf11 xmlns:a="instance:identifier:module" xmlns:b="augment:module:leaf:list" \
+ xmlns="augment:module:leaf:list">/a:cont/a:cont1/b:lflst11[.="lflst11_1"]</lf11>
+ </cont1>"""));
final var payload = body.toPayload(CONT_PATH);
final var lflst11 = QName.create("augment:module:leaf:list", "2014-01-27", "lflst11");
.build())
.withChild(ImmutableNodes.leafNode(LF11, YangInstanceIdentifier.of(CONT_NID, CONT1_NID,
new NodeIdentifier(LFLST11), new NodeWithValue<>(LFLST11, "lflst11_1"))))
- .build(), parseResource(uriPath, "/instanceidentifier/xml/xml_sub_container.xml"));
+ .build(), parse(uriPath, """
+ <cont1 xmlns="instance:identifier:module">
+ <lflst11 xmlns="augment:module:leaf:list">lflst11_1</lflst11>
+ <lflst11 xmlns="augment:module:leaf:list">lflst11_2</lflst11>
+ <lflst11 xmlns="augment:module:leaf:list">lflst11_3</lflst11>
+ <lf11 xmlns:a="instance:identifier:module" xmlns:b="augment:module:leaf:list" \
+ xmlns="augment:module:leaf:list">/a:cont/a:cont1/b:lflst11[.="lflst11_1"]</lf11>
+ </cont1>"""));
}
}
+++ /dev/null
-<cont1 xmlns="instance:identifier:module">
- <lflst11 xmlns="augment:module:leaf:list">lflst11_1</lflst11>
- <lflst11 xmlns="augment:module:leaf:list">lflst11_2</lflst11>
- <lflst11 xmlns="augment:module:leaf:list">lflst11_3</lflst11>
- <lf11 xmlns:a="instance:identifier:module" xmlns:b="augment:module:leaf:list" xmlns="augment:module:leaf:list">/a:cont/a:cont1/b:lflst11[.="lflst11_1"]</lf11>
-</cont1>
\ No newline at end of file