Exemplo n.º 1
0
        public void SelectNextTaskTest4()
        {
            _tasksLimit.LimitSimultaneousTasks = false;
            _tasksManager = new TasksManager(_tasksLimit, true);
            var task = new SymuTask(0)
            {
                Type = "todo"
            };

            _tasksManager.AddToDo(task);
            Assert.IsNotNull(_tasksManager.SelectNextTask(0));
            Assert.AreEqual(1, _tasksManager.InProgress.Count);
        }
Exemplo n.º 2
0
 public void SelectNextTaskTest3()
 {
     _tasksLimit.LimitSimultaneousTasks   = true;
     _tasksLimit.MaximumSimultaneousTasks = 1;
     _tasksManager = new TasksManager(_tasksLimit, true);
     _tasksManager.AddInProgress(new SymuTask(0)
     {
         Type = "ip"
     });
     _tasksManager.AddToDo(new SymuTask(0)
     {
         Type = "todo"
     });
     // without the limit, the task to do should be pushed in progress
     _tasksManager.SelectNextTask(0);
     Assert.AreEqual(1, _tasksManager.ToDo.Count);
 }
Exemplo n.º 3
0
 public void AddToDoTest()
 {
     _tasksManager.AddToDo(_task);
     Assert.AreEqual(1, _tasksManager.TaskResult.TotalTasksNumber);
     Assert.AreEqual(1, _tasksManager.TaskResult.ToDo);
     Assert.AreEqual(1, _tasksManager.ToDo.Count);
     Assert.AreEqual(0, _tasksManager.InProgress.Count);
     Assert.AreEqual(0, _tasksManager.Done.Count);
 }