예제 #1
0
        public void Down()
        {
            var t      = new TimingTracker(TimeSpan.FromSeconds(10));
            var result = t.Calculate(TimeSpan.FromSeconds(11), 5);

            Assert.AreEqual(4, result);
        }
예제 #2
0
        public void Minimum()
        {
            var t      = new TimingTracker(TimeSpan.FromSeconds(10));
            var result = t.Calculate(TimeSpan.FromSeconds(11), byte.MinValue);

            Assert.AreEqual(DequeueBatch <object> .MinimumBatchSize, result);
        }
예제 #3
0
        public void Up()
        {
            var t      = new TimingTracker(TimeSpan.FromSeconds(10));
            var result = t.Calculate(TimeSpan.FromSeconds(1), 1);

            Assert.AreEqual(2, result);
        }
예제 #4
0
        public void MaximumSpecified()
        {
            var t      = new TimingTracker(TimeSpan.FromSeconds(10), 22);
            var result = t.Calculate(TimeSpan.FromSeconds(1), byte.MaxValue);

            Assert.AreEqual(22, result);
        }