Exemple #1
0
        public void RespondsToHasQueueEqualsScoreAsFalseWhenMaxScoreIsNotReached()
        {
            var queuePosition = 0;
            var queueScore    = new SchedulerQueueScore(20);

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

            Assert.IsInstanceOf(typeof(SchedulerQueueScore), queueScore);
            Assert.False(queueScore.HasQueueEqualsScore(queuePosition));
        }
Exemple #2
0
        public void RespondsToHasQueueEqualsScoreAsTrueWhenMaxScoreIsReachedPuttingAdditionalScore()
        {
            var queuePosition = 0;
            var queueScore    = new SchedulerQueueScore(30);

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

            Assert.IsInstanceOf(typeof(SchedulerQueueScore), queueScore);
            Assert.True(queueScore.HasQueueEqualsScore(queuePosition, 20));
        }