use of org.opendaylight.restconf.common.patch.PatchContext in project netconf by opendaylight.
the class TestXmlPatchBodyReader method moduleDataMergeOperationOnContainerTest.
/**
* Test of Yang Patch merge operation on container. Test consists of two edit operations - create and merge.
*/
@Test
public void moduleDataMergeOperationOnContainerTest() throws Exception {
final String uri = "instance-identifier-patch-module:patch-cont";
mockBodyReader(uri, xmlToPatchBodyReader, false);
final InputStream inputStream = TestXmlBodyReader.class.getResourceAsStream("/instanceidentifier/xml/xmlPATCHdataMergeOperationOnContainer.xml");
final PatchContext returnValue = xmlToPatchBodyReader.readFrom(null, null, null, mediaType, null, inputStream);
checkPatchContext(returnValue);
}
use of org.opendaylight.restconf.common.patch.PatchContext in project netconf by opendaylight.
the class TestXmlPatchBodyReaderMountPoint method moduleDataAbsoluteTargetPathTest.
/**
* Test of Yang Patch with absolute target path.
*/
@Test
public void moduleDataAbsoluteTargetPathTest() throws Exception {
final String uri = MOUNT_POINT;
mockBodyReader(uri, xmlToPatchBodyReader, false);
final InputStream inputStream = TestXmlBodyReader.class.getResourceAsStream("/instanceidentifier/xml/xmlPATCHdataAbsoluteTargetPath.xml");
final PatchContext returnValue = xmlToPatchBodyReader.readFrom(null, null, null, mediaType, null, inputStream);
checkPatchContextMountPoint(returnValue);
}
Aggregations