Пример #1
0
 public void Hint_CallsAreMovesLeft()
 {
     MockRepository mocks = new MockRepository();
     GameState gameState = new GameState();
     PokemonBoard mockBoard = mocks.DynamicMock<PokemonBoard>();
     gameState.Board = mockBoard;
     _mainWindow.GameState = gameState;
     int row, col;
     mockBoard.Expect(g => g.areMovesLeft(gameState.CurrentGrid, out row, out col)).Return(false);
     mockBoard.Replay();
     _mainWindow.hint(_mainWindow, null);
     mockBoard.VerifyAllExpectations();
 }
Пример #2
0
 public void setUp()
 {
     _mocks = new MockRepository();
     _pokemonBoard = _mocks.PartialMock<PokemonBoard>();
     _gameState = new GameState();
 }
Пример #3
0
 /// <summary>
 /// Constructs a new GridButton with the given GameState, row, and column. 
 /// </summary>
 /// <param name="gameState">The state that this button belongs to. </param>
 /// <param name="row">The row that this button is in. </param>
 /// <param name="column">The column that this button is in. </param>
 public GridButton(GameState gameState, int row, int column)
 {
     this._row = row;
     this._column = column;
     this._gameState = gameState;
 }