예제 #1
0
        public void Index()
        {
            mockRepository.Setup(r => r.GetUsuarios()).Returns(usuarios);
            controller = new UsuariosController(mockRepository.Object);
            ViewResult result = controller.Index() as ViewResult;

            Assert.IsNotNull(result);
        }
예제 #2
0
        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");
        }