Exemple #1
0
        public void Remaining_BeforeStart_ReturnsInterval()
        {
            var timer = new ImmutableTimer(2).Tick(2);

            Assert.AreEqual(3, timer.Remaining(1));
        }
Exemple #2
0
        public void Remaining_WhenWrappingNext_ReturnsRemaining()
        {
            var timer = new ImmutableTimer(4).Tick(uint.MaxValue);

            Assert.AreEqual(2, timer.Remaining(1));
        }
Exemple #3
0
        public void Remaining_AfterTicked_ReturnsRemaining()
        {
            var timer = new ImmutableTimer(2).Tick(0);

            Assert.AreEqual(1, timer.Remaining(1));
        }
Exemple #4
0
        public void Remaining_AfterExpectedEnd_ReturnsZero()
        {
            var timer = new ImmutableTimer(2).Tick(0);

            Assert.AreEqual(0, timer.Remaining(3));
        }
Exemple #5
0
        public void Remaining_AtStart_ReturnsZero()
        {
            var timer = new ImmutableTimer(2);

            Assert.AreEqual(0, timer.Remaining(0));
        }