public void Index() { mockRepository.Setup(r => r.GetUsuarios()).Returns(usuarios); controller = new UsuariosController(mockRepository.Object); ViewResult result = controller.Index() as ViewResult; Assert.IsNotNull(result); }
public void Index_Test() { UsuariosController controller = new UsuariosController(); var result = controller.Index() as ViewResult; Assert.IsNotNull(result); Assert.IsTrue(string.IsNullOrEmpty(result.ViewName) || result.ViewName == "Index"); }