Ejemplo n.º 1
0
        internal static IHttpActionResult Delete()
        {
            var _places  = GetAll() as OkNegotiatedContentResult <IEnumerable <Place> >;
            var placeIDs = _places.Content.Select(t => t.ID).ToList();
            var response = baseController.Delete(placeIDs);

            return(response);
        }
Ejemplo n.º 2
0
        public void Delete_ClickDelete_CheckWork()
        {
            var lastPlaceBeforeDel = _placeService.GetItemList().LastOrDefault();

            var result = _controller.Delete(lastPlaceBeforeDel.Id.Value) as RedirectToRouteResult;

            Assert.AreEqual("Index", result.RouteValues["action"]);
            _placeService.Create(place2);
            _placeService.Save();
        }