Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "BUG 1082 Migrate sal-rest-connector to Async Data Broker API"
[controller.git]
/
opendaylight
/
md-sal
/
sal-rest-connector
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
sal
/
restconf
/
impl
/
xml
/
to
/
cnsn
/
test
/
XmlToCnSnTest.java
diff --git
a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/xml/to/cnsn/test/XmlToCnSnTest.java
b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/xml/to/cnsn/test/XmlToCnSnTest.java
index 5cda4a7f52014dc4a9ab3572d9073877ec12e74e..d0af29e913fa633381c176ff1796a2fbd3f41c29 100644
(file)
--- a/
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/xml/to/cnsn/test/XmlToCnSnTest.java
+++ b/
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/xml/to/cnsn/test/XmlToCnSnTest.java
@@
-14,7
+14,6
@@
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
-
import org.junit.BeforeClass;
import org.junit.Test;
import org.opendaylight.controller.sal.rest.impl.XmlToCompositeNodeProvider;
import org.junit.BeforeClass;
import org.junit.Test;
import org.opendaylight.controller.sal.rest.impl.XmlToCompositeNodeProvider;
@@
-33,9
+32,12
@@
public class XmlToCnSnTest extends YangAndXmlAndDataSchemaLoader {
@Test
public void testXmlLeafrefToCnSn() {
@Test
public void testXmlLeafrefToCnSn() {
-
CompositeNode compositeN
ode = TestUtils.readInputToCnSn("/xml-to-cnsn/leafref/xml/data.xml", false,
+
Node<?> n
ode = TestUtils.readInputToCnSn("/xml-to-cnsn/leafref/xml/data.xml", false,
XmlToCompositeNodeProvider.INSTANCE);
XmlToCompositeNodeProvider.INSTANCE);
- assertNotNull(compositeNode);
+ assertTrue(node instanceof CompositeNode);
+ CompositeNode compositeNode = (CompositeNode)node;
+
+
assertNotNull(dataSchemaNode);
TestUtils.normalizeCompositeNode(compositeNode, modules, schemaNodePath);
assertNotNull(dataSchemaNode);
TestUtils.normalizeCompositeNode(compositeNode, modules, schemaNodePath);
@@
-57,26
+59,26
@@
public class XmlToCnSnTest extends YangAndXmlAndDataSchemaLoader {
}
@Test
}
@Test
- public void testXmlBlankInput() throws Exception{
- InputStream inputStream = new ByteArrayInputStream(
"".getBytes()
);
-
CompositeNode compositeN
ode =
+ public void testXmlBlankInput() throws Exception
{
+ InputStream inputStream = new ByteArrayInputStream(
"".getBytes()
);
+
Node<?> n
ode =
XmlToCompositeNodeProvider.INSTANCE.readFrom(null, null, null, null, null, inputStream);
XmlToCompositeNodeProvider.INSTANCE.readFrom(null, null, null, null, null, inputStream);
- assertNull(
compositeN
ode );
+ assertNull(
n
ode );
}
@Test
}
@Test
- public void testXmlBlankInputUnmarkableStream() throws Exception{
- InputStream inputStream = new ByteArrayInputStream(
"".getBytes() )
{
+ public void testXmlBlankInputUnmarkableStream() throws Exception
{
+ InputStream inputStream = new ByteArrayInputStream(
"".getBytes())
{
@Override
public boolean markSupported() {
return false;
}
};
@Override
public boolean markSupported() {
return false;
}
};
-
CompositeNode compositeN
ode =
+
Node<?> n
ode =
XmlToCompositeNodeProvider.INSTANCE.readFrom(null, null, null, null, null, inputStream);
XmlToCompositeNodeProvider.INSTANCE.readFrom(null, null, null, null, null, inputStream);
- assertNull(
compositeN
ode );
+ assertNull(
n
ode );
}
}
}
}