Explorar o código

Added ReadDifficult

Piotr Czajkowski hai 1 ano
pai
achega
bbff6fba8f

+ 3 - 0
ExcelORM/ExcelORMTests/ExcelORMTests.csproj

@@ -36,6 +36,9 @@
       <None Update="testFiles\filtered.xlsx">
         <CopyToOutputDirectory>Always</CopyToOutputDirectory>
       </None>
+      <None Update="testFiles\columnsOnTheLeftHeaderNotFirstRow.xlsx">
+        <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+      </None>
     </ItemGroup>
 
     <ItemGroup>

+ 9 - 2
ExcelORM/ExcelORMTests/ReaderTests.cs

@@ -7,8 +7,7 @@ public class ReaderTests
     private const string RegularFile = "testFiles/first.xlsx";
     private const string HiddenFile = "testFiles/hidden.xlsx";
     private const string FilteredFile = "testFiles/filtered.xlsx";
-
-    
+    private const string DifficultFile = "testFiles/columnsOnTheLeftHeaderNotFirstRow.xlsx";
     
     [Fact]
     public void Read()
@@ -43,4 +42,12 @@ public class ReaderTests
         Assert.NotEmpty(resultsFiltered);
         Assert.NotEqual(results.Length, resultsFiltered.Length);
     }
+    
+    [Fact]
+    public void ReadDifficult()
+    {
+        var reader = new ExcelReader(DifficultFile);
+        var results = reader.Read<Test>().ToArray();
+        Assert.NotEmpty(results);
+    }
 }

BIN=BIN
ExcelORM/ExcelORMTests/testFiles/columnsOnTheLeftHeaderNotFirstRow.xlsx