예제 #1
0
 public void CreatePlayer()
 {
     game = new Game();
     input = new StubTextReader();
     output = new StringWriter();
     player = new HumanPlayer(game, input, output);
 }
예제 #2
0
 public void CreatePlayer()
 {
     game   = new Game();
     input  = new StubTextReader();
     output = new StringWriter();
     player = new HumanPlayer(game, input, output);
 }
예제 #3
0
        public void ReadLineReturnsFirstLineOfWhatWasWritten()
        {
            var reader = new StubTextReader();
            reader.WriteLine("First Line");
            reader.WriteLine("Second Line");

            Assert.That(reader.ReadLine(), Is.EqualTo("First Line"));
        }
예제 #4
0
        public void ReadLineReturnsFirstLineOfWhatWasWritten()
        {
            var reader = new StubTextReader();

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

            Assert.That(reader.ReadLine(), Is.EqualTo("First Line"));
        }
예제 #5
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"));
        }
예제 #6
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"));
        }
예제 #7
0
 public void CreateUI()
 {
     input  = new StubTextReader();
     output = new StringWriter();
     ui     = new ConsoleUI(input, output);
 }
예제 #8
0
        public void ReadLineReturnsEmptyStringIfNothingWritten()
        {
            var reader = new StubTextReader();

            Assert.That(reader.ReadLine(), Is.EqualTo(""));
        }
예제 #9
0
 public void ReadLineReturnsEmptyStringIfNothingWritten()
 {
     var reader = new StubTextReader();
     Assert.That(reader.ReadLine(), Is.EqualTo(""));
 }