Skip to content

Commit 60baa2e

Browse files
committed
Making ValidateDocTest easier to debug
1 parent 5bcaea0 commit 60baa2e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

marklogic-client-api/src/test/java/com/marklogic/client/test/rows/ValidateDocTest.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package com.marklogic.client.test.rows;
1717

18+
import com.fasterxml.jackson.databind.node.ObjectNode;
1819
import com.marklogic.client.FailedRequestException;
1920
import com.marklogic.client.datamovement.DataMovementManager;
2021
import com.marklogic.client.datamovement.WriteBatcher;
@@ -181,12 +182,13 @@ public void testUsingFromParamAndSchematron() {
181182
" <result>pass</result> \n" +
182183
"</user>").withFormat(Format.XML));
183184

184-
PlanBuilder.Plan plan = op.fromParam("myDocs", "", op.docColTypes())
185+
PlanBuilder.ModifyPlan plan = op.fromParam("myDocs", "", op.docColTypes())
185186
.validateDoc(op.col("doc"), op.schemaDefinition("schematron").withSchemaUri("/validateDoc/schematron.sch"))
186-
.write()
187-
.bindParam("myDocs", writeSet);
187+
.write();
188188

189-
List<RowRecord> rows = resultRows(plan);
189+
System.out.println("PLAN: " + plan.exportAs(ObjectNode.class).toPrettyString());
190+
191+
List<RowRecord> rows = resultRows(plan.bindParam("myDocs", writeSet));
190192
assertEquals(1, rows.size());
191193
DocumentManager docMgr = Common.client.newDocumentManager();
192194
assertNotNull(docMgr.exists("/acme/doc3.xml"));

0 commit comments

Comments
 (0)