Beispiel #1
0
        public void GetCustomerDataFromCsvFileTestWithNoFile()
        {
            var normalFilePath      = Path.GetFullPath("./TestData/SampleData.csv");
            var customerDataService = new CustomerDataService(normalFilePath);

            var wrongFilePath = Path.GetFullPath("./TestData/SampleDataNotExisting.csv");

            Assert.Throws <FileLoadException>(() => customerDataService.GetCustomerDataFromCsvFile(wrongFilePath));
        }
Beispiel #2
0
        public void GetCustomerDataFromCsvFileTestWithNormalFile()
        {
            var filePath            = Path.GetFullPath("./TestData/SampleData1.csv");
            var customerDataService = new CustomerDataService(filePath);

            var results = customerDataService.GetCustomerDataFromCsvFile(filePath);

            Assert.Equal(30, results.Count);
        }