public void CheckScaleEvery(QueuePriority priority, byte expected)
        {
            var s    = new QueueThroughput();
            var data = s.CheckScaleEvery(priority);

            Assert.AreEqual(expected, data);
        }
        public void MaximumScale(QueuePriority priority, byte expected)
        {
            var s    = new QueueThroughput();
            var data = s.Scale(priority);

            Assert.AreEqual(expected, data.Maximum);
        }
        public void MinimumFrequency(QueuePriority priority, byte expected)
        {
            var s    = new QueueThroughput();
            var data = s.Frequency(priority);

            Assert.AreEqual(expected, data.Minimum);
        }
        public void MessagesPerScaleUnit(QueuePriority priority, ushort expected)
        {
            var s    = new QueueThroughput();
            var data = s.MessagesPerScaleUnit(priority);

            Assert.AreEqual(expected, data);
        }
        public void RunnerLow()
        {
            var runs = Substitute.For <IDynamicRuns>();

            runs.MinimumPeriodInSeconds.Returns(10);

            var s        = new QueueThroughput();
            var scalable = s.Runner(runs, QueuePriority.Low);

            Assert.IsNotNull(runs);
            Assert.IsNotNull(scalable as AdaptiveRunner);
        }
        public void RunnerRunsNull()
        {
            var s = new QueueThroughput();

            Assert.That(() => s.Runner(null, QueuePriority.High), Throws.TypeOf <ArgumentNullException>());
        }