Exemplo n.º 1
0
        public void Queue_Initial()
        {
            var scheduler = new TestableScheduler()
            {
                IsReliable = true
            };

            scheduler.GetScheduledTasks().Should().BeEmpty();
            scheduler.TryStartDispatcherCount.Should().Be(0);
        }
Exemplo n.º 2
0
        public void Queue_AfterQueueTasks()
        {
            var scheduler = new TestableScheduler()
            {
                IsReliable = true
            };
            var task0 = ATask();
            var task1 = ATask();
            var task2 = ATask();

            scheduler.QueueTask(task0);
            scheduler.QueueTask(task1);
            scheduler.QueueTask(task2);

            scheduler.GetScheduledTasks().Should().BeEquivalentTo(task0, task1, task2);
            scheduler.TryStartDispatcherCount.Should().Be(3);
        }