Ejemplo n.º 1
0
        public ActionResult DeleteSearchAlert(Guid searchId)
        {
            try
            {
                _jobAdSearchAlertsCommand.DeleteJobAdSearchAlert(CurrentMember.Id, searchId);
            }
            catch (UserException ex)
            {
                ModelState.AddModelError(ex, new StandardErrorHandler());
            }

            return(Json(new JsonResponseModel()));
        }
Ejemplo n.º 2
0
        public void TestDeleteJustJobAdAlert()
        {
            // Create it.

            var ownerId = Guid.NewGuid();
            var search  = CreateJobAdSearch(1);

            _jobAdSearchAlertsCommand.CreateJobAdSearchAlert(ownerId, search, DateTime.Now);

            // Delete it.

            _jobAdSearchAlertsCommand.DeleteJobAdSearchAlert(ownerId, search.Id);

            AssertSearch(search, _jobAdSearchAlertsQuery.GetJobAdSearch(search.Id));
            Assert.IsNull(_jobAdSearchAlertsQuery.GetJobAdSearchAlert(search.Id));
        }