예제 #1
0
        public void TemplateTaskTest()
        {
            var t = new TemplateTask(1, "M1");

            t.Description = "d";
            t.MilestoneId = 4;
            t.Priority    = TaskPriority.Low;
            t.SortOrder   = 5;

            var t2 = engine.SaveTemplateTask(t);

            t2 = engine.GetTemplateTask(t2.Id);

            Assert.AreEqual(t.Title, t2.Title);
            Assert.AreEqual(t.ProjectId, t2.ProjectId);
            Assert.AreEqual(t.Description, t2.Description);
            Assert.AreEqual(t.MilestoneId, t2.MilestoneId);
            Assert.AreEqual(t.Priority, t2.Priority);
            Assert.AreEqual(t.Responsible, t2.Responsible);
            Assert.AreEqual(t.SortOrder, t2.SortOrder);
            Assert.AreNotEqual(t.CreateBy, default(Guid));
            Assert.AreNotEqual(t.CreateOn, default(DateTime));

            foreach (var d in engine.GetTemplateTasks(1))
            {
                engine.RemoveTemplateTask(d.Id);
            }
        }