private void CrearProductoGrabar() { ConfiguracionBasica_MockData(); controller = new ProductoController(_repository); var result = controller.Crear(DataProducto()) as PartialViewResult; result.Should().BeNull(); personDbSetMock.Verify(s => s.Add(It.IsAny <Product>()), Times.Once()); webContextMock.Verify(c => c.SaveChanges(), Times.Once()); }
private void CrearProductoVista() { ConfiguracionBasica_MockData(); controller = new ProductoController(_repository); var result = controller.Crear() as PartialViewResult; result.ViewName.Should().Be("_Crear"); var personModelCreate = (Product)result.Model; personModelCreate.Should().NotBeNull(); }