예제 #1
0
        public void TestAddSubTask()
        {
            YouCompleteMe.Models.Subtask subtask = new YouCompleteMe.Models.Subtask();
            subtask.taskID          = 33;
            subtask.st_CreatedDate  = DateTime.Now;
            subtask.st_Deadline     = DateTime.Now;
            subtask.st_CompleteDate = DateTime.Now;
            subtask.st_Priority     = 2;
            subtask.st_Description  = "use for test unit test";
            subtask.note            = "this use only for unit test";

            int subtaskID = SubtaskController.AddSubTask(subtask);

            YouCompleteMe.Models.Subtask result = SubtaskController.getASubTask(subtaskID);
            Assert.AreEqual(subtaskID, result.subtaskID);
        }
예제 #2
0
        public void TestGetSubTaskWithFailData()
        {
            Subtask result = SubtaskController.getASubTask(-1);

            Assert.AreEqual(null, result);
        }