Piotr Czajkowski vor 1 Jahr
Ursprung
Commit
33d50fbb5c
1 geänderte Dateien mit 7 neuen und 12 gelöschten Zeilen
  1. 7 12
      ExcelORM/ExcelORMTests/ReaderWriterTests.cs

+ 7 - 12
ExcelORM/ExcelORMTests/ReaderWriterTests.cs

@@ -24,8 +24,7 @@ public class ReaderWriterTests
     public void Read()
     {
         var reader = new ExcelReader(RegularFile);
-        var results = reader.Read<Test>();
-        Assert.NotNull(results);
+        var results = reader.Read<Test>().ToArray();
         Assert.NotEmpty(results);
     }
     
@@ -33,29 +32,25 @@ public class ReaderWriterTests
     public void ReadHidden()
     {
         var reader = new ExcelReader(HiddenFile);
-        var results = reader.Read<Test>();
-        Assert.NotNull(results);
+        var results = reader.Read<Test>().ToArray();
         Assert.NotEmpty(results);
 
         var readerHidden = new ExcelReader(HiddenFile) { SkipHidden = true };
-        var resultsHidden = readerHidden.Read<Test>();
-        Assert.NotNull(resultsHidden);
+        var resultsHidden = readerHidden.Read<Test>().ToArray();
         Assert.NotEmpty(resultsHidden);
-        Assert.NotEqual(results.Count(), resultsHidden.Count());
+        Assert.NotEqual(results.Length, resultsHidden.Length);
     }
     
     [Fact]
     public void ReadFiltered()
     {
         var reader = new ExcelReader(FilteredFile);
-        var results = reader.Read<Test>();
-        Assert.NotNull(results);
+        var results = reader.Read<Test>().ToArray();
         Assert.NotEmpty(results);
 
         var readerFiltered = new ExcelReader(FilteredFile) { ObeyFilter = true };
-        var resultsFiltered = readerFiltered.Read<Test>();
-        Assert.NotNull(resultsFiltered);
+        var resultsFiltered = readerFiltered.Read<Test>().ToArray();
         Assert.NotEmpty(resultsFiltered);
-        Assert.NotEqual(results.Count(), resultsFiltered.Count());
+        Assert.NotEqual(results.Length, resultsFiltered.Length);
     }
 }