public CreateShopTest() { _shopRepo = new Mock <IShopRepository>(); _shopRepo.Setup(x => x.Add(It.IsAny <Shop>())).Verifiable(); _uow = new Mock <IUnitOfWork>(); _uow.Setup(x => x.Save()).Verifiable(); _service = new CreateShop(_shopRepo.Object, _uow.Object); model = new CreateShopModel() { Code = "Codigo", Name = "Nombre" }; }
public void Execute(CreateShopModel model) { _shopRepo.Add(new Shop(model.Code, model.Name)); _uow.Save(); }