1616
1717package com .marklogic .client .functionaltest ;
1818
19- import static org .custommonkey . xmlunit . XMLAssert . assertXMLEqual ;
19+ import static org .junit . Assert . assertEquals ;
2020import static org .junit .Assert .assertTrue ;
2121
2222import java .io .IOException ;
@@ -71,8 +71,14 @@ public static void setUp() throws Exception
7171
7272 // get xml document for expected result
7373 Document expectedDoc = expectedXMLDocument (filename );
74-
75- assertXMLEqual ("Write XML difference" , expectedDoc , readDoc );
74+
75+ assertEquals ("First Node incorrect in input doc" ,readDoc .getFirstChild ().getNodeName ().trim (),"food" );
76+ assertEquals ("First Node attribute incorrect in input doc" ,readDoc .getFirstChild ().getAttributes ().item (0 ).getNodeValue ().trim (),"en" );
77+ assertEquals ("Child Node value incorrect in input doc" ,readDoc .getChildNodes ().item (0 ).getTextContent ().trim (),"noodle" );
78+
79+ assertEquals ("First Node incorrect in output doc" ,expectedDoc .getFirstChild ().getNodeName ().trim (),"food" );
80+ assertEquals ("First Node attribute incorrect in output doc" ,expectedDoc .getFirstChild ().getAttributes ().item (0 ).getNodeValue ().trim (),"en" );
81+ assertEquals ("Child Node value incorrect in output doc" ,expectedDoc .getChildNodes ().item (0 ).getTextContent ().trim (),"noodle" );
7682
7783 // update the doc
7884 // acquire the content for update
@@ -83,11 +89,13 @@ public static void setUp() throws Exception
8389 DOMHandle updateHandle = readDocumentUsingDOMHandle (client , uri + filename , "XML" );
8490
8591 Document readDocUpdate = updateHandle .get ();
86-
92+
8793 // get xml document for expected result
8894 Document expectedDocUpdate = expectedXMLDocument (updateFilename );
8995
90- assertXMLEqual ("Write XML difference" , expectedDocUpdate , readDocUpdate );
96+ assertEquals ("First Node incorrect in output doc" ,readDocUpdate .getFirstChild ().getNodeName ().trim (),"food" );
97+ assertEquals ("First Node attribute incorrect in output doc" ,readDocUpdate .getFirstChild ().getAttributes ().item (0 ).getNodeValue ().trim (),"en" );
98+ assertEquals ("Child Node value incorrect in output doc" ,readDocUpdate .getChildNodes ().item (0 ).getTextContent ().trim (),"fried noodle" );
9199
92100 // delete the document
93101 deleteDocument (client , uri + filename , "XML" );
0 commit comments