예제 #1
0
        public void TestCreateNewSprint()
        {
            var project = controller.CreateNewProject();

            project.Name        = "Test project name";
            project.Description = "Test project description";
            project             = controller.SaveProject(project);

            var result = controller.CreateNewSprint(project.Id);

            Assert.IsNotNull(result);
            Assert.AreEqual(0, result.Id);
            Assert.IsNull(result.Name);
            Assert.IsNull(result.Description);
            Assert.IsNull(result.CreatedBy);
            Assert.AreEqual(DateTime.MinValue, result.Created);
            Assert.IsNull(result.ModifiedBy);
            Assert.AreEqual(DateTime.MinValue, result.Modified);

            Assert.IsNotNull(result.Activities);
            Assert.IsNotNull(result.Attachments);
            Assert.IsNotNull(result.Comments);
            Assert.IsNotNull(result.Tasks);

            Assert.IsNotNull(result.Project);
            Assert.AreEqual(project.Id, result.Project.Id);
        }
예제 #2
0
        public void TestCreateNewSprintTask()
        {
            var project = controller.CreateNewProject();

            project = controller.SaveProject(project);
            var sprint = controller.CreateNewSprint(project.Id);
            var result = controller.CreateNewTask(sprint);

            Assert.IsNotNull(result);
            Assert.AreNotEqual(DateTime.MinValue, result.Created);
            Assert.AreNotEqual(DateTime.MinValue, result.Modified);
            Assert.IsNotNull(result.Kind);
            Assert.IsNotNull(result.Status);
            Assert.IsNotNull(result.Activities);
            Assert.IsNotNull(result.Attachments);
            Assert.IsNotNull(result.Comments);

            AssertTaskInProject(project, result);
            AssertTaskInSprint(sprint, result);
        }