|
23 | 23 | import java.io.IOException;
|
24 | 24 | import java.io.Reader;
|
25 | 25 |
|
26 |
| -import javax.xml.XMLConstants; |
27 |
| - |
28 | 26 | import com.fasterxml.jackson.databind.JsonNode;
|
29 | 27 | import com.fasterxml.jackson.databind.ObjectMapper;
|
30 | 28 | import com.fasterxml.jackson.databind.node.ArrayNode;
|
|
40 | 38 | import com.marklogic.client.document.DocumentPatchBuilder;
|
41 | 39 | import com.marklogic.client.document.DocumentPatchBuilder.Position;
|
42 | 40 | import com.marklogic.client.document.JSONDocumentManager;
|
43 |
| -import com.marklogic.client.document.XMLDocumentManager; |
44 | 41 | import com.marklogic.client.io.BytesHandle;
|
45 | 42 | import com.marklogic.client.io.DOMHandle;
|
46 | 43 | import com.marklogic.client.io.FileHandle;
|
@@ -91,23 +88,6 @@ public void testReadWrite() throws IOException {
|
91 | 88 | File file = docMgr.read(docId, new FileHandle()).get();
|
92 | 89 | readNode = mapper.readTree(file);
|
93 | 90 | assertTrue("JSON document mismatch with file", sourceNode.equals(readNode));
|
94 |
| - |
95 |
| - docMgr.write(docId, |
96 |
| - new StringHandle().with(GenericDocumentTest.metadata).withFormat(Format.XML), |
97 |
| - new StringHandle().with(content)); |
98 |
| - docText = docMgr.read(docId, new StringHandle()).get(); |
99 |
| - assertNotNull("Read null string for JSON content",docText); |
100 |
| - readNode = mapper.readTree(docText); |
101 |
| - assertTrue("Failed to read JSON document as String", sourceNode.equals(readNode)); |
102 |
| - |
103 |
| - String lang = "fr-CA"; |
104 |
| - docMgr.setLanguage(lang); |
105 |
| - docMgr.write(docId, new StringHandle().with(content)); |
106 |
| - |
107 |
| - XMLDocumentManager xmlMgr = Common.client.newXMLDocumentManager(); |
108 |
| - Document document = xmlMgr.read(docId, new DOMHandle()).get(); |
109 |
| - assertEquals("Failed to set language attribute on JSON", lang, |
110 |
| - document.getDocumentElement().getAttributeNS(XMLConstants.XML_NS_URI, "lang")); |
111 | 91 | }
|
112 | 92 |
|
113 | 93 | @Test
|
|
0 commit comments