public void Down() { var t = new TimingTracker(TimeSpan.FromSeconds(10)); var result = t.Calculate(TimeSpan.FromSeconds(11), 5); Assert.AreEqual(4, result); }
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); }
public void Up() { var t = new TimingTracker(TimeSpan.FromSeconds(10)); var result = t.Calculate(TimeSpan.FromSeconds(1), 1); Assert.AreEqual(2, result); }
public void MaximumSpecified() { var t = new TimingTracker(TimeSpan.FromSeconds(10), 22); var result = t.Calculate(TimeSpan.FromSeconds(1), byte.MaxValue); Assert.AreEqual(22, result); }