Exemplo n.º 1
0
        public void TaskManger_AddTask_Test2()
        {
            TaskManager.ClearGroups();
            DailyTask task = new DailyTask()
            {
                Title = "Title", TaskItems = new List <TaskItem> {
                    new TaskItem {
                        Content = "Content"
                    }
                }, Date = DateTime.Now
            };
            CustomTasks doingTasks   = DoingTasks.Instance;
            CustomTasks deletedTasks = FinishTasks.Instance;

            TaskManager.AddGroup(doingTasks);
            TaskManager.AddGroup(deletedTasks);
            TaskManager.AddTask(doingTasks, task);

            Assert.IsTrue(TaskManager.GetTaskGroups().Count == 2, TaskManager.GetTaskGroups().Count.ToString());
            Assert.IsNotNull(TaskManager.GetTaskGroup(task.GroupId));
            Assert.AreEqual(1, TaskManager.GetTaskGroup(task.GroupId).DailyTasks.Count);

            TaskManager.MoveTask(deletedTasks, task);
            Assert.AreEqual(TaskManager.GetTaskGroup(task.GroupId).GroupId, FinishTasks.GUID);
        }
Exemplo n.º 2
0
        public void TaskManager_AddGroup_Test()
        {
            TaskManager.ClearGroups();
            CustomTasks doingTasks = DoingTasks.Instance;

            TaskDay.Core.TaskManager.AddGroup(doingTasks);
            Assert.IsTrue(TaskManager.GetTaskGroups().Count == 1);
        }
Exemplo n.º 3
0
        public void TaskManager_AddTask_Test()
        {
            TaskManager.ClearGroups();
            CustomTasks doingTasks = DoingTasks.Instance;

            TaskDay.Core.TaskManager.AddTask(doingTasks, new DailyTask {
                Title = "Test"
            });
            Assert.AreEqual(1, TaskManager.GetTaskGroups().Count);
            Assert.IsTrue(TaskManager.GetTaskGroup(doingTasks.GroupId).DailyTasks.Count == 1);
        }
Exemplo n.º 4
0
        public TestModel()
        {
            CustomTasks doingGroup  = DoingTasks.Instance;
            CustomTasks deleteGroup = FinishTasks.Instance;

            TaskManager.AddGroup(doingGroup);
            TaskManager.AddGroup(deleteGroup);

            DailyTask dt1 = new DailyTask()
            {
                Title = "Task1", TaskItems = new List <TaskItem> {
                    new TaskItem {
                        Content = "Content1\r\nContent_1"
                    }
                }
            };
            DailyTask dt2 = new DailyTask()
            {
                Title = "Task2", TaskItems = new List <TaskItem> {
                    new TaskItem {
                        Content = "Content2"
                    }
                }
            };
            DailyTask dt3 = new DailyTask()
            {
                Title = "Task3", TaskItems = new List <TaskItem> {
                    new TaskItem {
                        Content = "Content3"
                    }
                }
            };
            DailyTask dt4 = new DailyTask()
            {
                Title = "Task4", TaskItems = new List <TaskItem> {
                    new TaskItem {
                        Content = "Content4"
                    }
                }
            };

            TaskManager.AddTask(doingGroup, dt1);
            TaskManager.AddTask(doingGroup, dt2);
            TaskManager.AddTask(doingGroup, dt3);
            TaskManager.AddTask(doingGroup, dt4);
        }