use of com.marklogic.client.document.DocumentManager in project components by Talend.
the class MarkLogicWriterTest method testWriteNotIndexedRecord.
@Test
public void testWriteNotIndexedRecord() throws IOException {
DocumentManager markLogicDocMngrMock = mock(DocumentManager.class);
MarkLogicSink someSink = new MarkLogicSink();
someSink.ioProperties = new MarkLogicOutputProperties("outputProps");
writer = someSink.createWriteOperation().createWriter(null);
writer.docMgr = markLogicDocMngrMock;
writer.write(new Object());
verifyZeroInteractions(markLogicDocMngrMock);
}
use of com.marklogic.client.document.DocumentManager in project components by Talend.
the class MarkLogicWriterTest method testMarkLogicUpsertBinaryText.
@Test
public void testMarkLogicUpsertBinaryText() throws IOException {
DocumentManager markLogicDocMngrMock = prepareDocManagerText(MarkLogicOutputProperties.Action.UPSERT, MarkLogicOutputProperties.DocType.BINARY);
verify(markLogicDocMngrMock).write(anyString(), (GenericWriteHandle) anyObject());
}
use of com.marklogic.client.document.DocumentManager in project components by Talend.
the class MarkLogicWriterTest method testMarkLogicDelete.
@Test
public void testMarkLogicDelete() throws IOException {
DocumentManager markLogicDocMngrMock = prepareDocManagerText(MarkLogicOutputProperties.Action.DELETE, MarkLogicOutputProperties.DocType.JSON);
verify(markLogicDocMngrMock).delete(anyString());
}
use of com.marklogic.client.document.DocumentManager in project components by Talend.
the class MarkLogicWriterTest method testMarkLogicPatchXML.
@Test
public void testMarkLogicPatchXML() throws IOException {
DocumentManager markLogicDocMngrMock = prepareDocManagerText(MarkLogicOutputProperties.Action.PATCH, MarkLogicOutputProperties.DocType.XML);
verify(markLogicDocMngrMock).patch(anyString(), (DocumentPatchHandle) anyObject());
}
use of com.marklogic.client.document.DocumentManager in project components by Talend.
the class MarkLogicWriterTest method testMarkLogicUpsertText.
@Test
public void testMarkLogicUpsertText() throws IOException {
DocumentManager markLogicDocMngrMock = prepareDocManagerText(MarkLogicOutputProperties.Action.UPSERT, MarkLogicOutputProperties.DocType.PLAIN_TEXT);
verify(markLogicDocMngrMock).write(anyString(), (GenericWriteHandle) anyObject());
}
Aggregations