public void CanReadNextLineAndReadIfEndOfStream() { var input = new StringReader("a\n bc\nd"); var reader = new InputReader(input); Assert.True(reader.ReadNextLine()); Assert.True(reader.Read()); Assert.AreEqual('a', reader.CurrentChar); Assert.False(reader.Read()); Assert.True(reader.ReadNextLineAndReadIfEndOfStream()); Assert.AreEqual('b', reader.CurrentChar); Assert.True(reader.Read()); Assert.AreEqual('c', reader.CurrentChar); Assert.False(reader.Read()); Assert.False(reader.Read()); Assert.True(reader.ReadNextLineAndReadIfEndOfStream()); Assert.AreEqual('d', reader.CurrentChar); Assert.False(reader.Read()); Assert.False(reader.ReadNextLineAndReadIfEndOfStream()); Assert.False(reader.Read()); }