public void EnableBatchProcessing_InvalidBatchSize_ExceptionThrown(int size) { var builder = new TestConsumerEndpointBuilder(); Action act = () => builder.EnableBatchProcessing(size).Build(); act.Should().ThrowExactly <ArgumentOutOfRangeException>(); }
public void EnableBatchProcessing_ValidBatchSettings_BatchSettingsSet(int size) { var builder = new TestConsumerEndpointBuilder(); var endpoint = builder.EnableBatchProcessing(size, TimeSpan.FromMinutes(42)).Build(); endpoint.Batch.Should().NotBeNull(); endpoint.Batch !.Size.Should().Be(size); endpoint.Batch !.MaxWaitTime.Should().Be(TimeSpan.FromMinutes(42)); }