def testAnyHutWithMoreThanSevenResources(self): hut = AnyHut() resources = [3,3,3,5,5,5,5,5] self.assertEqual([], hut.missing(resources)) self.assertEqual(0, hut.value(), "value should be 0 before cost is calculated") self.assertEqual([3,3,3,5,5,5,5], hut.costs(resources)) self.assertEqual(29, hut.value(), "value should be 29")
def testAnyHutWithMoreThanSevenResources(self): hut = AnyHut() resources = [3, 3, 3, 5, 5, 5, 5, 5] self.assertEqual([], hut.missing(resources)) self.assertEqual(0, hut.value(), "value should be 0 before cost is calculated") self.assertEqual([3, 3, 3, 5, 5, 5, 5], hut.costs(resources)) self.assertEqual(29, hut.value(), "value should be 29")
def testAnyHutWithResources(self): hut = AnyHut() resources = [Resource.food,Resource.food,Resource.wood,Resource.stone,Resource.stone] self.assertEqual([], hut.missing(resources)) self.assertEqual([Resource.wood,Resource.stone,Resource.stone], hut.costs(resources))
def testAnyHutWithJokerResource(self): hut = AnyHut() resources = [Resource.joker] self.assertEqual([], hut.missing(resources)) self.assertEqual([Resource.gold], hut.costs(resources))
def testAnyHutWithOnlyFood(self): hut = AnyHut() resources = [Resource.food,Resource.food] self.assertEqual([Resource.wood], hut.missing(resources)) self.assertEqual([], hut.costs(resources))
def testAnyHutWithOnlyFood(self): hut = AnyHut() resources = [2,2] self.assertEqual([3], hut.missing(resources)) self.assertEqual([], hut.costs(resources))
def testAnyHutWithResources(self): hut = AnyHut() resources = [2,2,3,5,5] self.assertEqual([], hut.missing(resources)) self.assertEqual([3,5,5], hut.costs(resources))
def testAnyHutWithOnlyFood(self): hut = AnyHut() resources = [2, 2] self.assertEqual([3], hut.missing(resources)) self.assertEqual([], hut.costs(resources))
def testAnyHutWithResources(self): hut = AnyHut() resources = [2, 2, 3, 5, 5] self.assertEqual([], hut.missing(resources)) self.assertEqual([3, 5, 5], hut.costs(resources))