public void GameProperReAssignmentTest() { WarPlayer target = new WarPlayer(); AbstractWarGame expected = new MockWarGame(WarGameState.AtBattle); target.Game = new MockWarGame(WarGameState.AtBattle); target.Game = null; target.Game = expected; Assert.AreEqual(expected, target.Game); }
public void GameSimpleAssignmentTest() { WarPlayer target = new WarPlayer(); // TODO: Initialize to an appropriate value AbstractWarGame expected = new MockWarGame(WarGameState.AtBattle); AbstractWarGame actual = expected; target.Game = expected; actual = target.Game; Assert.AreEqual(expected, actual); }
public void PlayWithoutCardsTest() { WarPlayer target = new WarPlayer(); // TODO: Initialize to an appropriate value MockWarGame warGame = new MockWarGame(WarGameState.AtBattle); target.Game = warGame; target.Play(); warGame.AssertCallCounts( playerBattle: 1, playerGoToWar: 0, playerPickWarAttack: 0); }
public void PlayWarDeclaredTest() { WarPlayer target = new WarPlayer(); target.Cards.AddRange(CardList.CreateDeck()); MockWarGame warGame = new MockWarGame(WarGameState.WarDeclared); target.Game = warGame; target.Play(); warGame.AssertCallCounts(playerGoToWar: 1); }
public void PlayGameOverTest() { WarPlayer target = new WarPlayer(); target.Cards.AddRange(CardList.CreateDeck()); MockWarGame warGame = new MockWarGame(WarGameState.GameOver); target.Game = warGame; target.Play(); warGame.AssertCallCounts(); }
public void PlayAtWarBattleTest() { WarPlayer target = new WarPlayer(); target.Cards.AddRange(CardList.CreateDeck()); MockWarGame warGame = new MockWarGame(WarGameState.WarDeclared); target.Game = warGame; target.Play(); warGame.SetGameState(WarGameState.AtWar); target.Play(); warGame.AssertCallCounts(playerGoToWar:1, playerPickWarAttack:1, lastAttackIndex:2); }
public void PlayAtBattleTest() { WarPlayer target = new WarPlayer(); // TODO: Initialize to an appropriate value target.Cards.AddRange(CardList.CreateDeck()); MockWarGame warGame = new MockWarGame(WarGameState.AtBattle); target.Game = warGame; target.Play(); warGame.AssertCallCounts(playerBattle:1); }