public void AddImageTest() { var image = new Image(); _imagesService.Add(image); _mock.Verify(item => item.Add(image), Times.Once()); }
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)); }