|
@@ -11,6 +11,7 @@ public class ReaderTests
|
|
|
private const string MultipleSheetsFile = "testFiles/multipleSheets.xlsx";
|
|
|
private const string DifferentTypesFile = "testFiles/differentTypes.xlsx";
|
|
|
private const string WithFormulaFile = "testFiles/withFormula.xlsx";
|
|
|
+ private const string BadDate = "testFiles/badDate.xlsx";
|
|
|
|
|
|
[Fact]
|
|
|
public void Read()
|
|
@@ -109,4 +110,11 @@ public class ReaderTests
|
|
|
var results = reader.Read<TestWithFormula>().ToArray();
|
|
|
Assert.NotEmpty(results);
|
|
|
}
|
|
|
+
|
|
|
+ [Fact]
|
|
|
+ public void BadDateThrows()
|
|
|
+ {
|
|
|
+ using var reader = new ExcelReader(BadDate);
|
|
|
+ Assert.Throws<ArgumentException>(() => reader.Read<TestTypes>().ToArray());
|
|
|
+ }
|
|
|
}
|