def test_sendForward_Handequals25_At_FirstPlay(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) b = playerHand(share2) a.sendForward() self.assertEqual(len(share1), 25)
def test_sendForward_entersCard_to_table(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) b = playerHand(share2) a.sendForward() self.assertNotEqual(len(share1), len(share2))
def test_plunder_count_on_win_firstRound(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) b = playerHand(share2) a.plunder(('Z','ZZ')) self.assertEqual(len(share1), 27)
def test_plunder_one(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) b = playerHand(share2) a.plunder(('Z','ZZ')) self.assertNotEqual(len(share1), len(share2))
def test_reinforce_return_2_CardsWhenHasMoreThan2Cards_During_War(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) soldier = Warriors('Vikram',a) hold = soldier.reinforce() self.assertEqual(len(hold), 2)
def test_enterNegotiations_firstRound(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) soldier = Warriors('Vikram',a) aa = soldier.enterNegotiations() self.assertEqual(aa, ('D', 'A'))
def test_standingArmy_NotTrue(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) soldier = Warriors('Vikram',a) soldier.player.hand = [] self.assertFalse(soldier.standingArmy()>1)
def test_reinforce_returns_emptyList_when0cardsOnHand_During_War(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) soldier = Warriors('Vikram',a) soldier.player.hand = [] hold = soldier.reinforce() self.assertEqual(len(hold), len([]))
def test_reinforce_return_emptyListWhen1cardOnHand_During_War(self): deck = cardDeck() share1, share2 = deck.serveCards() a = playerHand(share1) soldier = Warriors('Vikram',a) soldier.player.hand = [] soldier.player.hand.append(('H','A')) hold = soldier.reinforce() self.assertEqual(len(hold), 0)
def test_shuffleHand_shuffles_current_hand(self): deck = cardDeck() share1, share2 = deck.serveCards() hold = share1 a = playerHand(share1) self.assertNotEqual(hold,a.shuffleHand())