예제 #1
0
 public void ReadBadRowsIgnoreErrorEnabled()
 {
     CsvTestReader reader = new CsvTestReader(@"..\..\InvalidCsv.txt", true);
     reader.Read();
     Assert.AreEqual(3, reader.getErrors().Count);
     reader.Close();
 }
예제 #2
0
        public void ReadBadRowValues()
        {
            CsvTestReader reader = new CsvTestReader(@"..\..\InvalidCsv.txt");
            reader.Read();
            Assert.AreEqual("Test", reader.GetValue(0));

            reader.Read();
            Assert.AreEqual("One,Two,Three,Four", reader.GetValue(0));

            reader.Read();
            Assert.AreEqual(@"""Row", reader.GetValue(0));

            Assert.AreEqual(false, reader.Read());

            reader.Close();
        }
예제 #3
0
 public void ReadBadRows()
 {
     CsvTestReader reader = new CsvTestReader(@"..\..\InvalidCsv.txt");
     while (reader.Read())
     {
     }
     reader.Close();
 }
예제 #4
0
 public void TestOfGoodFile()
 {
     CsvTestReader reader = new CsvTestReader(@"..\..\SimpleCsv.txt");
     Assert.AreEqual(false, reader.Read());
 }