public Arrangement(ICSVImporter <CSVStopViewModel> importer, IFileSystem fileSystem, IConfiguration configuration) { Importer = importer; FileSystem = fileSystem; Configuration = configuration; SUT = new CSVStopRepository(importer, fileSystem, configuration); }
public CSVStopRepository(ICSVImporter <CSVStopViewModel> importer, IFileSystem fileSystem, IConfiguration configuration) { if (importer == null) { throw new ArgumentNullException(nameof(importer)); } if (fileSystem == null) { throw new ArgumentNullException(nameof(fileSystem)); } if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } var data = fileSystem.File.ReadAllText(configuration["CSVFileLocation"]); stops = importer.Import(configuration["CharSeperator"][0], data); }