Exemplo n.º 1
0
        public void ReadLineReturnsFirstLineOfWhatWasWritten()
        {
            var reader = new StubTextReader();
            reader.WriteLine("First Line");
            reader.WriteLine("Second Line");

            Assert.That(reader.ReadLine(), Is.EqualTo("First Line"));
        }
Exemplo n.º 2
0
        public void ReadLineRemembersWhatWasAlreadyRead()
        {
            var reader = new StubTextReader();
            reader.WriteLine("First Line");
            reader.WriteLine("Second Line");
            reader.ReadLine();

            Assert.That(reader.ReadLine(), Is.EqualTo("Second Line"));
        }