public void DoesntExecuteWithInvalidTokenCount() { var tokensToTake = new TokenCollection(1, 1, 0, 0, 0, 0); var player = new Player("Shaggy"); var board = new GameBoard(PlayerCount.Two, _nobles, _developments); var sut = new TakeTwoSameAction(tokensToTake); Assert.IsFalse(sut.TryExecuteAction(player, board, out var result)); Assert.AreEqual(ExecutionResult.InvalidTokenCombination, result); }
public void CanExecuteInValidConditions() { var tokensToTake = new TokenCollection(0, 0, 2, 0, 0, 0); var player = new Player("Shaggy"); var board = new GameBoard(PlayerCount.Two, _nobles, _developments); var sut = new TakeTwoSameAction(tokensToTake); Assert.IsTrue(sut.TryExecuteAction(player, board, out var result)); Assert.AreEqual(ExecutionResult.Success, result); }
public void DoesntExecuteWhenRequestedColorHasLessThenFourOnBoard() { var tokensToTake = new TokenCollection(0, 0, 2, 0, 0, 0); var player = new Player("Shaggy"); var board = new GameBoard(PlayerCount.Two, _nobles, _developments); var sut = new TakeTwoSameAction(tokensToTake); board.TryTakeTokensFormBoard(new TokenCollection(0, 0, 1, 0, 0, 0)); Assert.IsFalse(sut.TryExecuteAction(player, board, out var result)); Assert.AreEqual(ExecutionResult.InsufficientTokens, result); }