Пример #1
0
        public void DefaultValues()
        {
            var config = new FunctionResultAggregatorOptions();

            Assert.Equal(TimeSpan.FromSeconds(30), config.FlushTimeout);
            Assert.Equal(1000, config.BatchSize);
            Assert.Equal(true, config.IsEnabled);
        }
Пример #2
0
        public void FlushTimeout_Limits(TimeSpan flushTimeout, bool throws)
        {
            var config = new FunctionResultAggregatorOptions();
            ArgumentOutOfRangeException caughtEx = null;

            try
            {
                config.FlushTimeout = flushTimeout;
            }
            catch (ArgumentOutOfRangeException ex)
            {
                caughtEx = ex;
            }

            Assert.Equal(throws, caughtEx != null);
        }
Пример #3
0
        public void BatchSize_Limits(int batchSize, bool throws)
        {
            var config = new FunctionResultAggregatorOptions();
            ArgumentOutOfRangeException caughtEx = null;

            try
            {
                config.BatchSize = batchSize;
            }
            catch (ArgumentOutOfRangeException ex)
            {
                caughtEx = ex;
            }

            Assert.Equal(throws, caughtEx != null);
        }