def test__setUpTreasureCards(self): self.mocker.StubOutWithMock(Game, '_makePile') Game._makePile(dominion_data.cards['copper'], dominion_rules.GAME_SETUP.COPPER_CARDS).AndReturn("copper pile") Game._makePile(dominion_data.cards['silver'], dominion_rules.GAME_SETUP.SILVER_CARDS).AndReturn("silver pile") Game._makePile(dominion_data.cards['gold'], dominion_rules.GAME_SETUP.GOLD_CARDS).AndReturn("gold pile") self.mocker.ReplayAll() game = Game() game._setUpTreasureCards() self.assertEqual(game.SupplyArea.CopperPile, "copper pile") self.assertEqual(game.SupplyArea.SilverPile, "silver pile") self.assertEqual(game.SupplyArea.GoldPile, "gold pile") self.mocker.VerifyAll()
def test_setUpGame(self): self.mocker.StubOutWithMock(Game, '_setUpTreasureCards') Game._setUpTreasureCards() self.mocker.StubOutWithMock(Game, '_setUpVictoryCards') Game._setUpVictoryCards() self.mocker.StubOutWithMock(Game, '_setUpCurseCards') Game._setUpCurseCards() self.mocker.StubOutWithMock(Game, '_setUpKingdomCards') Game._setUpKingdomCards() self.mocker.StubOutWithMock(Game, '_setUpInitialDecks') Game._setUpInitialDecks() self.mocker.StubOutWithMock(Game, '_drawFirstHands') Game._drawFirstHands() self.mocker.ReplayAll() game = Game() game.setUpGame() self.mocker.VerifyAll()