Search in sources :

Example 11 with DocumentManager

use of com.marklogic.client.document.DocumentManager in project components by Talend.

the class MarkLogicWriterTest method testWriteNull.

@Test
public void testWriteNull() 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(null);
    verifyZeroInteractions(markLogicDocMngrMock);
}
Also used : MarkLogicOutputProperties(org.talend.components.marklogic.tmarklogicoutput.MarkLogicOutputProperties) DocumentManager(com.marklogic.client.document.DocumentManager) Test(org.junit.Test)

Aggregations

DocumentManager (com.marklogic.client.document.DocumentManager)11 Test (org.junit.Test)10 MarkLogicOutputProperties (org.talend.components.marklogic.tmarklogicoutput.MarkLogicOutputProperties)4 IndexedRecord (org.apache.avro.generic.IndexedRecord)3 DatabaseClient (com.marklogic.client.DatabaseClient)2 GenericData (org.apache.avro.generic.GenericData)2 Matchers.anyObject (org.mockito.Matchers.anyObject)2 RuntimeContainer (org.talend.components.api.container.RuntimeContainer)2 DocumentDescriptor (com.marklogic.client.document.DocumentDescriptor)1 DocumentUriTemplate (com.marklogic.client.document.DocumentUriTemplate)1 FileHandle (com.marklogic.client.io.FileHandle)1 AbstractWriteHandle (com.marklogic.client.io.marker.AbstractWriteHandle)1 File (java.io.File)1