Пример #1
0
        public void DoesNotGetFilesWhenDirectoryNotFound()
        {
            // Arrange
            _directoryFinder.Exists(Arg.Any <string>()).Returns(false);

            // Act
            _target.Index();

            // Assert
            _csvLoader.DidNotReceive().GetFiles();
        }
 public string FindFilesMessage()
 {
     if (_directoryFinder.Exists(_path))
     {
         return("The following input files are available:");
     }
     return("Could not find InputFiles directory");
 }
Пример #3
0
        public IActionResult Index()
        {
            var model = new CsvModel {
                FilesFoundMessage = _csvLoader.FindFilesMessage()
            };

            if (_directoryFinder.Exists(_inputFilesPath))
            {
                model.Files = _csvLoader.GetFiles();
            }

            return(View(model));
        }