1 | public void testNoAdditionalWhiteSpaceForText() throws IOException {↵ | | 1 | public void testNoAdditionalWhiteSpaceForEmptyElement() throws IOException {↵
|
2 | Document d = DOMUtils.newDocument();↵ | | 2 | Document d = DOMUtils.newDocument();↵
|
3 | Element root = d.createElement("root");↵ | | 3 | Element root = d.createElement("root");↵
|
4 | DOMUtils.appendTextElement(root, "textElement", "content");↵ | | 4 | DOMUtils.createChildElement(root, "emptyElement");↵
|
|
5 | StringWriter sw = new StringWriter();↵ | | 5 | StringWriter sw = new StringWriter();↵
|
6 | DOMElementWriter w = new DOMElementWriter();↵ | | 6 | DOMElementWriter w = new DOMElementWriter();↵
|
7 | w.write(root, sw, 0, " ");↵ | | 7 | w.write(root, sw, 0, " ");↵
|
8 | assertEquals("<root>" + StringUtils.LINE_SEP↵ | | 8 | assertEquals("<root>" + StringUtils.LINE_SEP↵
|
9 | + " <textElement>content</text↵ | | 9 | // + " <emptyElement></emptyElement>"↵
|
10 | Element>"↵ | | 10 | + " <emptyElement />"↵
|
11 | + StringUtils.LINE_SEP↵ | | 11 | + StringUtils.LINE_SEP↵
|
12 | + "</root>" + StringUtils.LINE_SEP,↵ | | 12 | + "</root>" + StringUtils.LINE_SEP,↵
|
13 | sw.toString());↵ | | 13 | sw.toString());↵
|
14 | | | 14 |
|