Пример #1
0
        public void CalculateCatchup_None()
        {
            // add one
            buffer.Add(0, default);

            // catch-up starts at threshold = 1. so nothing.
            Assert.That(SnapshotInterpolation.CalculateCatchup(buffer, 1, 10), Is.EqualTo(0));
        }
Пример #2
0
        public void CalculateCatchup_Multiple()
        {
            // add three
            buffer.Add(0, default);
            buffer.Add(1, default);
            buffer.Add(2, default);

            // catch-up starts at threshold = 1. so two are multiplied by 10.
            Assert.That(SnapshotInterpolation.CalculateCatchup(buffer, 1, 10), Is.EqualTo(20));
        }
Пример #3
0
 public void CalculateCatchup_Empty()
 {
     // make sure nothing happens with buffer size = 0
     Assert.That(SnapshotInterpolation.CalculateCatchup(buffer, 0, 10), Is.EqualTo(0));
 }