コード例 #1
0
ファイル: BoardTests.cs プロジェクト: camachorm/TicTacToe
 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");
 }
コード例 #2
0
ファイル: BoardTests.cs プロジェクト: camachorm/JobHunting
        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");
        }
コード例 #3
0
ファイル: BoardTests.cs プロジェクト: camachorm/JobHunting
 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?");
 }
コード例 #4
0
ファイル: BoardTests.cs プロジェクト: camachorm/JobHunting
 public void GetSquare_CorrectResult_Test()
 {
     _board = new Board();
     Assert.IsTrue(_board.GetSquare(0, 0) == Board.SquareState.Unchecked,
                   "Correctly obtaining the square after update");
 }
コード例 #5
0
ファイル: BoardTests.cs プロジェクト: camachorm/TicTacToe
 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?");
 }
コード例 #6
0
ファイル: BoardTests.cs プロジェクト: camachorm/TicTacToe
 public void GetSquare_CorrectResult_Test()
 {
     _board = new Board();
     Assert.IsTrue(_board.GetSquare(0, 0) == Board.SquareState.Unchecked,
         "Correctly obtaining the square after update");
 }