예제 #1
0
        public void CheckScaleEvery(QueuePriority priority, byte expected)
        {
            var s    = new QueueThroughput();
            var data = s.CheckScaleEvery(priority);

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

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

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

            Assert.AreEqual(expected, data);
        }
예제 #5
0
        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);
        }
예제 #6
0
        public void RunnerRunsNull()
        {
            var s = new QueueThroughput();

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