@Ignore
@Test
public void saveCnSnWithLeafListInstIdentifierToXmlTest() throws WebApplicationException, IOException,
- URISyntaxException, XMLStreamException {
+ URISyntaxException, XMLStreamException {
CompositeNode cnSn = prepareCnSn(createInstanceIdentifierWithLeafList());
String output = TestUtils.writeCompNodeWithSchemaContextToOutput(cnSn, modules, dataSchemaNode,
StructuredDataToXmlProvider.INSTANCE);
@Test
public void saveCnSnWithLeafListInstIdentifierToJsonTest() throws WebApplicationException, IOException,
- URISyntaxException {
+ URISyntaxException {
CompositeNode cnSn = prepareCnSn(createInstanceIdentifierWithLeafList());
String output = TestUtils.writeCompNodeWithSchemaContextToOutput(cnSn, modules, dataSchemaNode,
StructuredDataToJsonProvider.INSTANCE);
assertTrue(strInOutput);
}
- private void validateXmlOutput(String xml) throws XMLStreamException {
+ private void validateXmlOutput(final String xml) throws XMLStreamException {
XMLInputFactory xmlInFactory = XMLInputFactory.newInstance();
XMLEventReader eventReader;
}
- private void validateXmlOutputWithLeafList(String xml) throws XMLStreamException {
+ private void validateXmlOutputWithLeafList(final String xml) throws XMLStreamException {
XMLInputFactory xmlInFactory = XMLInputFactory.newInstance();
XMLEventReader eventReader;
}
- private CompositeNode prepareCnSn(InstanceIdentifier instanceIdentifier) throws URISyntaxException {
+ private CompositeNode prepareCnSn(final InstanceIdentifier instanceIdentifier) throws URISyntaxException {
MutableCompositeNode cont = NodeFactory.createMutableCompositeNode(
TestUtils.buildQName("cont", "instance:identifier:module", "2014-01-17"), null, null,null,null);
MutableCompositeNode cont1 = NodeFactory.createMutableCompositeNode(
lst11, instanceIdentifier,null,null);
- lst11.getChildren().add(lf111);
+ lst11.getValue().add(lf111);
lst11.init();
- cont1.getChildren().add(lst11);
+ cont1.getValue().add(lst11);
cont1.init();
- cont.getChildren().add(cont1);
+ cont.getValue().add(cont1);
cont.init();
return cont;
pathArguments.add(new NodeIdentifier(new QName(new URI("augment:augment:module"), "lf112")));
- return new InstanceIdentifier(pathArguments);
+ return InstanceIdentifier.create(pathArguments);
}
private InstanceIdentifier createInstanceIdentifierWithLeafList() throws URISyntaxException {
pathArguments.add(new NodeIdentifier(new QName(new URI("instance:identifier:module"), "cont1")));
pathArguments.add(new NodeWithValue(new QName(new URI("augment:module:leaf:list"), "lflst11"), "lflst11_1"));
- return new InstanceIdentifier(pathArguments);
+ return InstanceIdentifier.create(pathArguments);
}
}