Esempio n. 1
0
        public void RespondsToResetScoreSettingTheScoreEvenWhenThereIsNoScoreAtPosition()
        {
            var queuePosition = 0;
            var queueScore    = new SchedulerQueueScore(20);

            Assert.IsInstanceOf(typeof(SchedulerQueueScore), queueScore);
            queueScore.ResetScore(queuePosition, 20);
            Assert.True(queueScore.HasQueueReachedScore(queuePosition));
        }
Esempio n. 2
0
        public void RespondsToResetScoreSettingTheScore()
        {
            var queuePosition = 0;
            var queueScore    = new SchedulerQueueScore(10);

            queueScore.RefreshScore(queuePosition, 5);
            queueScore.RefreshScore(queuePosition, 5);

            Assert.IsInstanceOf(typeof(SchedulerQueueScore), queueScore);
            Assert.True(queueScore.HasQueueReachedScore(queuePosition));

            queueScore.UpdateMaxScore(20);
            queueScore.ResetScore(queuePosition, 20);
            Assert.True(queueScore.HasQueueReachedScore(queuePosition));
        }