+ checkExpectValueNormalizeNodeContext(dataSchemaNode, returnValue, dataII);
+ }
+
+ @Test
+ public void moduleSubContainerAugmentDataPostTest() throws Exception {
+ final DataSchemaNode dataSchemaNode = schemaContext.getDataChildByName("cont");
+ final Module augmentModule = schemaContext.findModuleByNamespace(new URI("augment:module")).iterator().next();
+ QName contAugmentQName = QName.create(augmentModule.getQNameModule(), "cont-augment");
+ YangInstanceIdentifier.AugmentationIdentifier augII = new YangInstanceIdentifier.AugmentationIdentifier(
+ Sets.newHashSet(contAugmentQName));
+ final YangInstanceIdentifier dataII = YangInstanceIdentifier.of(dataSchemaNode.getQName())
+ .node(augII).node(contAugmentQName);
+ final String uri = "instance-identifier-module:cont";
+ mockBodyReader(uri, xmlBodyReader, true);
+ final InputStream inputStream = TestXmlBodyReader.class
+ .getResourceAsStream("/instanceidentifier/xml/xml_augment_container.xml");
+ final NormalizedNodeContext returnValue = xmlBodyReader
+ .readFrom(null, null, null, mediaType, null, inputStream);
+ checkNormalizedNodeContext(returnValue);
+ checkExpectValueNormalizeNodeContext(dataSchemaNode, returnValue, dataII);
+ }
+
+ @Test
+ public void moduleSubContainerChoiceAugmentDataPostTest() throws Exception {
+ final DataSchemaNode dataSchemaNode = schemaContext.getDataChildByName("cont");
+ final Module augmentModule = schemaContext.findModuleByNamespace(new URI("augment:module")).iterator().next();
+ QName augmentChoice1QName = QName.create(augmentModule.getQNameModule(), "augment-choice1");
+ QName augmentChoice2QName = QName.create(augmentChoice1QName, "augment-choice2");
+ final QName containerQName = QName.create(augmentChoice1QName, "case-choice-case-container1");
+ YangInstanceIdentifier.AugmentationIdentifier augChoice1II = new YangInstanceIdentifier.AugmentationIdentifier(
+ Sets.newHashSet(augmentChoice1QName));
+ YangInstanceIdentifier.AugmentationIdentifier augChoice2II = new YangInstanceIdentifier.AugmentationIdentifier(
+ Sets.newHashSet(augmentChoice2QName));
+ final YangInstanceIdentifier dataII = YangInstanceIdentifier.of(dataSchemaNode.getQName())
+ .node(augChoice1II).node(augmentChoice1QName).node(augChoice2II).node(augmentChoice2QName)
+ .node(containerQName);
+ final String uri = "instance-identifier-module:cont";
+ mockBodyReader(uri, xmlBodyReader, true);
+ final InputStream inputStream = TestXmlBodyReader.class
+ .getResourceAsStream("/instanceidentifier/xml/xml_augment_choice_container.xml");
+ final NormalizedNodeContext returnValue = xmlBodyReader
+ .readFrom(null, null, null, mediaType, null, inputStream);
+ checkNormalizedNodeContext(returnValue);
+ checkExpectValueNormalizeNodeContext(dataSchemaNode, returnValue, dataII);