public void TestCargarFuncionarios()
        {
            // Arrange
            //Creamos httpContextMock and serverMock:
            var httpContextMock = new Mock <HttpContextBase>();
            var serverMock      = new Mock <HttpServerUtilityBase>();

            //Mock el path original
            serverMock.Setup(x => x.MapPath("./ArchivoCSV")).Returns(Path.GetFullPath("../../ArchivoCSVtest"));

            //Mockeamos el objeto HTTPContext.Server con el servidor ya mockeado:
            httpContextMock.Setup(x => x.Server).Returns(serverMock.Object);

            //Creo el controlador y su contexto
            CSVController controller = new CSVController();

            controller.ControllerContext = new ControllerContext(httpContextMock.Object, new RouteData(), controller);

            //Insertamos el csv
            string     filePath   = Path.GetFullPath("../../ArchivoCSVtest/listaFuncionarioTest.csv");
            FileStream fileStream = new FileStream(filePath, FileMode.Open);

            //Cargamos el mock
            Mock <HttpPostedFileBase> uploadedFile = new Mock <HttpPostedFileBase>();

            uploadedFile.Setup(x => x.FileName).Returns("listaFuncionarioTest.csv");
            uploadedFile.Setup(x => x.ContentType).Returns("listaFuncionarioTest.csv");
            uploadedFile.Setup(x => x.InputStream).Returns(fileStream);
            HttpPostedFileBase[] httpPostedFileBases = { uploadedFile.Object };
            // Act
            ViewResult result = controller.Funcionarios(httpPostedFileBases[0]) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
        public void TestFuncionarios()
        {
            // Arrange
            Init("*****@*****.**");
            CurrentUser.setCurrentUser("*****@*****.**", "Superusuario", "0000000001", "0000000001");
            CSVController controller = new CSVController();
            // Act
            ViewResult result = controller.Funcionarios() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }