public void GetHeaders_EmptyFile_ReturnEmptyFileHeaders(ExcelSettings settings, int headersNum) { // arrange ExcelDataImport importer = new ExcelDataImport(settings); // act var headers = importer.GetHeaders(); // assert Assert.AreEqual(headersNum, headers.Count()); }
public void GetHeaders_FileDoesNotExist_ThrowFileNotFoundException(ExcelSettings settings) { // arrange ExcelDataImport importer = new ExcelDataImport(settings); // act TestDelegate action = () => importer.GetHeaders(); // assert Assert.Throws <FileNotFoundException>(action); }
public void GetHeaders_NoHeaders_ReturnGenericHeaders(ExcelSettings settings, IEnumerable <object> validHeaders) { // arrange ExcelDataImport importer = new ExcelDataImport(settings); // act var headers = importer.GetHeaders(); // assert CollectionAssert.AreEqual(validHeaders, headers); }