public void ThrowExceptionIfColumnNumberIsOutOfRange(int expectedColumnNumber) { const string csvPath = @"D:\a\review-case-s21b11\review-case-s21b11\sample-review\review-report.csv"; var checkPath = PathExistence.CheckFileExistOrNot(csvPath); if (checkPath) { var lines = System.IO.File.ReadAllLines(csvPath); Assert.Throws <System.IndexOutOfRangeException>(() => ColumnFilter.PrintCsvColumn(lines, expectedColumnNumber)); } else { Assert.True(false); } }
public void TestingForTheExistenceOfCsvFile() { const string csvPath = @"D:\a\review-case-s21b11\review-case-s21b11\sample-review\review-report.csv"; Assert.True(PathExistence.CheckFileExistOrNot(csvPath)); }
public void TestingForTheNonExistenceOfCsvFile(string csvPath) { //const string csvPath = @"E:\Philips\Review-case-s21b11-master\sample-review\Review-report.csv"; PathExistence.CheckFileExistOrNot(csvPath); Assert.False(PathExistence.CheckFileExistOrNot(csvPath)); }