Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
BUG 1016 - JSON|XML output with|without white chars
[controller.git]
/
opendaylight
/
md-sal
/
sal-rest-connector
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
sal
/
restconf
/
impl
/
cnsn
/
to
/
json
/
test
/
CnSnToJsonNotExistingLeafTypeTest.java
diff --git
a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonNotExistingLeafTypeTest.java
b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonNotExistingLeafTypeTest.java
index 24dba17c90cdff4e9a87d0a059160357dcbaad88..3f89c97367efd2f849802a61d5e4fec1f12149f1 100644
(file)
--- a/
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonNotExistingLeafTypeTest.java
+++ b/
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/cnsn/to/json/test/CnSnToJsonNotExistingLeafTypeTest.java
@@
-9,6
+9,7
@@
package org.opendaylight.controller.sal.restconf.impl.cnsn.to.json.test;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import static org.opendaylight.controller.sal.restconf.impl.test.TestUtils.containsStringData;
import java.io.IOException;
import java.util.Collections;
import java.io.IOException;
import java.util.Collections;
@@
-50,7
+51,9
@@
public class CnSnToJsonNotExistingLeafTypeTest extends YangAndXmlAndDataSchemaLo
Collections.<Module>emptySet(), prepareDataSchemaNode(),
StructuredDataToJsonProvider.INSTANCE);
assertNotNull(jsonOutput);
Collections.<Module>emptySet(), prepareDataSchemaNode(),
StructuredDataToJsonProvider.INSTANCE);
assertNotNull(jsonOutput);
- assertTrue(jsonOutput.contains("\"lf1\": \"\""));
+
+// pattern for e.g. > "lf1" : "" < or >"lf1":""<
+ assertTrue(containsStringData(jsonOutput, "\"lf1\"",":","\"\""));
}
private CompositeNode prepareCompositeNode() {
}
private CompositeNode prepareCompositeNode() {