public void ReadLineRemembersWhatWasAlreadyRead() { var reader = new StubTextReader(); reader.WriteLine("First Line"); reader.WriteLine("Second Line"); reader.ReadLine(); Assert.AreEqual(reader.ReadLine(), "Second Line"); }
public void ReadLineReturnsFirstLineOfWhatWasWritten() { var reader = new StubTextReader(); reader.WriteLine("First Line"); reader.WriteLine("Second Line"); Assert.AreEqual(reader.ReadLine(), "First Line"); }
public void ReadLineReturnsEmptyStringIfNothingWritten() { var reader = new StubTextReader(); Assert.AreEqual(reader.ReadLine(), ""); }