Пример #1
0
        public void ReadLineRemembersWhatWasAlreadyRead()
        {
            var reader = new StubTextReader();

            reader.WriteLine("First Line");
            reader.WriteLine("Second Line");
            reader.ReadLine();

            Assert.AreEqual(reader.ReadLine(), "Second Line");
        }
Пример #2
0
        public void ReadLineReturnsFirstLineOfWhatWasWritten()
        {
            var reader = new StubTextReader();

            reader.WriteLine("First Line");
            reader.WriteLine("Second Line");

            Assert.AreEqual(reader.ReadLine(), "First Line");
        }
Пример #3
0
        public void ReadLineReturnsEmptyStringIfNothingWritten()
        {
            var reader = new StubTextReader();

            Assert.AreEqual(reader.ReadLine(), "");
        }