public EsSinkEventProcessorTest() { _client = new MockElasticClient(MockBehavior.Strict); _checkpointManager = new Mock <ICheckpointManager>(MockBehavior.Loose); _partition = MockPartitionContext(_checkpointManager.Object); _processor = new EsSinkEventProcessor( _client.Object, initialBackoffDelayInMilliseconds: 0, maxBackoffDelayInMilliseconds: 0, maxFailedDocumentRetries: MaxFailedDocumentRetries, maxAbandonedDocumentRetries: MaxAbandonedDocumentRetries); }
public static void VerifyBulkAsyncCalled(this MockElasticClient mock, Times timesCalled) { mock.MockLowLevelClient.Verify(c => c.BulkAsync <BulkResponse>(It.IsAny <PostData <object> >(), It.IsAny <Func <BulkRequestParameters, BulkRequestParameters> >()), timesCalled); }
public static ISetup <IElasticLowLevelClient, Task <ElasticsearchResponse <BulkResponse> > > OnBulkAsync(this MockElasticClient mock) { return(mock.MockLowLevelClient.Setup(c => c.BulkAsync <BulkResponse>(It.IsAny <PostData <object> >(), It.IsAny <Func <BulkRequestParameters, BulkRequestParameters> >()))); }