示例#1
0
        public ActionResult Delete(int id)
        {
            ActionConfirmation deleteConfirmation = _supportTeamManagementService.Delete(id);

            TempData[ControllerEnums.GlobalViewDataProperty.PageMessage.ToString()] =
                deleteConfirmation.Message;
            return(RedirectToAction("Search"));
        }
示例#2
0
        public void CanDeleteSupportTeam()
        {
            // Establish Context
            var supportTeamToDelete = new SupportTeam();

            supportTeamRepository.Expect(r => r.Get(1))
            .Return(supportTeamToDelete);

            // Act
            ActionConfirmation confirmation =
                supportTeamManagementService.Delete(1);

            // Assert
            confirmation.ShouldNotBeNull();
            confirmation.WasSuccessful.ShouldBeTrue();
            confirmation.Value.ShouldBeNull();
        }