public void ParsingTextReaderBlockingReadLine5() { StringReader strReader = new StringReader(TestData5); BlockingTextReader reader = ParsingTextReader.CreateBlocking(strReader); String s = reader.ReadLine(); Assert.AreEqual(TestData5.Substring(0, 26), s); s = reader.ReadLine(); Assert.AreEqual(TestData5.Substring(28), s); Assert.AreEqual(-1, reader.Peek()); Assert.AreEqual(-1, reader.Read()); reader.Close(); }
public void ParsingTextReaderBlockingReadLine() { StringReader strReader = new StringReader(TestData); BlockingTextReader reader = ParsingTextReader.CreateBlocking(strReader); String s = reader.ReadLine(); Assert.Equal(TestData, s); Assert.Equal(-1, reader.Peek()); Assert.Equal(-1, reader.Read()); reader.Close(); }
public void ParsingBlockingTextReaderReadLine5() { StringReader strReader = new StringReader(TestData5); BlockingTextReader reader = new BlockingTextReader(strReader); String s = reader.ReadLine(); Assert.AreEqual(TestData5.Substring(0, 26), s); s = reader.ReadLine(); Assert.AreEqual(TestData5.Substring(28), s); Assert.AreEqual(-1, reader.Peek()); Assert.AreEqual(-1, reader.Read()); reader.Close(); }