Exemplo n.º 1
0
        public ActionResult Delete(int id)
        {
            var sprint = SprintService.SprintFetch(id);

            SprintService.SprintDelete(id);

            return(this.RedirectToAction("Edit", "Project", new { id = sprint.ProjectId }));
        }
        public void Sprint_Delete()
        {
            var sprint = BusinessHelper.CreateSprintAndLogon(
                SprintTestsWithRoleContribute.UserName,
                SprintTestsWithRoleContribute.UserPassword);

            Exception exception = null;

            try
            {
                SprintService.SprintDelete(sprint.SprintId);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception == null, "Exception should be null");
        }
        public void Sprint_Delete()
        {
            var sprint = BusinessHelper.CreateSprintAndLogon(
                 SprintTestsWithRoleReview.UserName, SprintTestsWithRoleReview.UserPassword);

            Exception exception = null;

            try
            {
                SprintService.SprintDelete(sprint.SprintId);
            }
            catch (Exception ex)
            {
                exception = ex;
            }

            Assert.IsTrue(exception != null, "Exception should not be null");
            Assert.IsTrue(exception.GetBaseException() is SecurityException);
        }
Exemplo n.º 4
0
        public void Sprint_Delete()
        {
            var sprint  = SprintService.SprintNew();
            var project = BusinessHelper.CreateProject();

            sprint.ProjectId = project.ProjectId;
            sprint.Name      = DataHelper.RandomString(20);

            sprint = SprintService.SprintSave(sprint);

            sprint = SprintService.SprintFetch(sprint.SprintId);

            SprintService.SprintDelete(sprint.SprintId);

            try
            {
                SprintService.SprintFetch(sprint.SprintId);
            }
            catch (Exception ex)
            {
                Assert.IsTrue(ex.GetBaseException() is InvalidOperationException);
            }
        }