Browse Source

Another test

Piotr Czajkowski 6 months ago
parent
commit
04db6c872b
1 changed files with 12 additions and 0 deletions
  1. 12 0
      ExcelORM/ExcelORMTests/ReaderTests.cs

+ 12 - 0
ExcelORM/ExcelORMTests/ReaderTests.cs

@@ -87,5 +87,17 @@ public class ReaderTests
         Assert.NotEmpty(results);
         Assert.All(results, x => Assert.Null(x.Text));
         Assert.NotNull(results.FirstOrDefault(x => x.Date != null));
+        Assert.NotNull(results.FirstOrDefault(x => x.Int != null));
+    }
+
+    [Fact]
+    public void ReadDifferentTypesWithSkipMiddle()
+    {
+        var reader = new ExcelReader(DifferentTypesFile);
+        var results = reader.Read<TestSkipMiddle>().ToArray();
+        Assert.NotEmpty(results);
+        Assert.NotNull(results.FirstOrDefault(x => x.Text != null));
+        Assert.All(results, x => Assert.Null(x.Date));
+        Assert.NotNull(results.FirstOrDefault(x => x.Int != null));
     }
 }