public void TestRead_SkipRecord_NoParsingError() { const string text = "a b c"; FixedLengthSchema schema = new FixedLengthSchema(); schema.AddColumn(new Int32Column("A"), 8); schema.AddColumn(new DateTimeColumn("B"), 23); schema.AddColumn(new GuidColumn("C"), 2); StringReader stringReader = new StringReader(text); FixedLengthReader parser = new FixedLengthReader(stringReader, schema); bool canRead = parser.Skip(); Assert.IsTrue(canRead, "Could not skip the record."); canRead = parser.Read(); Assert.IsFalse(canRead, "No more records should have been read."); }
public bool Skip() { return(reader.Skip()); }
public void TestRead_SkipRecord_NoParsingError() { const string text = "a b c"; FixedLengthSchema schema = new FixedLengthSchema(); schema.AddColumn(new Int32Column("A"), 8); schema.AddColumn(new DateTimeColumn("B"), 23); schema.AddColumn(new GuidColumn("C"), 2); StringReader stringReader = new StringReader(text); FixedLengthReader parser = new FixedLengthReader(stringReader, schema); bool canRead = parser.Skip(); Assert.True(canRead, "Could not skip the record."); canRead = parser.Read(); Assert.False(canRead, "No more records should have been read."); }