public void AddImageTest()
        {
            var image = new Image();

            _imagesService.Add(image);
            _mock.Verify(item => item.Add(image), Times.Once());
        }
예제 #2
0
        public ActionResult CreateImage(OImageSach model)
        {
            try
            {
                imgService.Add(model);

                return(RedirectToAction("Images", "QuanLySanPham", new { masp = model.MaSanPham }));
            }
            catch (Exception e)
            {
            }

            ViewBag.IsEdit = true;
            return(View("UpdateImage", model));
        }