コード例 #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();
     s.Runner(null, QueuePriority.High);
 }