Ejemplo n.º 1
0
        public void EnableBatchProcessing_InvalidBatchSize_ExceptionThrown(int size)
        {
            var builder = new TestConsumerEndpointBuilder();

            Action act = () => builder.EnableBatchProcessing(size).Build();

            act.Should().ThrowExactly <ArgumentOutOfRangeException>();
        }
Ejemplo n.º 2
0
        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));
        }