Exemple #1
0
        public void Draw()
        {
            // arrange
            var ui  = new UI_Mock(new[] { 5, 1, 2, 7, 3, 6, 4, 8, 9 });
            var ttt = new Program(ui);

            // act
            ttt.Start();

            // assert
            Assert.AreEqual("No one won.", ui.Messages.Last());
        }
Exemple #2
0
        public void Win_Y()
        {
            // arrange
            var ui  = new UI_Mock(new[] { 4, 1, 5, 2, 8, 3 });
            var ttt = new Program(ui);

            // act
            ttt.Start();

            // assert
            Assert.AreEqual("The winner is Y!", ui.Messages.Last());
        }