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

            Assert.AreEqual(4, result);
        }
Esempio n. 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);
        }
Esempio n. 3
0
        public void Up()
        {
            var t      = new TimingTracker(TimeSpan.FromSeconds(10));
            var result = t.Calculate(TimeSpan.FromSeconds(1), 1);

            Assert.AreEqual(2, result);
        }
Esempio n. 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);
        }