Ejemplo n.º 1
0
 public void GetSquare_AfterUpdateCorrectResult_Test()
 {
     _board = new Board();
     var choice = _board.GetRandomChoice();
     _board.MakeAMove(_noughts, choice);
     Assert.IsTrue(_board.GetSquare(choice) == Board.SquareState.Noughts,
         "Correctly obtaining the square after update");
 }
Ejemplo n.º 2
0
        public void GetSquare_AfterUpdateCorrectResult_Test()
        {
            _board = new Board();
            var choice = _board.GetRandomChoice();

            _board.MakeAMove(_noughts, choice);
            Assert.IsTrue(_board.GetSquare(choice) == Board.SquareState.Noughts,
                          "Correctly obtaining the square after update");
        }
Ejemplo n.º 3
0
 public void GetSquare_OutOfBounds_Test()
 {
     _board = new Board();
     Assert.Throws <IndexOutOfRangeException>(() => _board.GetSquare(4, 4),
                                              "Trying to get a square out of bounds didnt throw an exception?");
 }
Ejemplo n.º 4
0
 public void GetSquare_CorrectResult_Test()
 {
     _board = new Board();
     Assert.IsTrue(_board.GetSquare(0, 0) == Board.SquareState.Unchecked,
                   "Correctly obtaining the square after update");
 }
Ejemplo n.º 5
0
 public void GetSquare_OutOfBounds_Test()
 {
     _board = new Board();
     Assert.Throws<IndexOutOfRangeException>(() => _board.GetSquare(4, 4),
         "Trying to get a square out of bounds didnt throw an exception?");
 }
Ejemplo n.º 6
0
 public void GetSquare_CorrectResult_Test()
 {
     _board = new Board();
     Assert.IsTrue(_board.GetSquare(0, 0) == Board.SquareState.Unchecked,
         "Correctly obtaining the square after update");
 }