Exemplo n.º 1
0
 def test_remove_quality_on_sell_by_date(self):
     item = Item("Apple after the sell by date", -1 , 3)
     decrease_quality(item)
     self.assertEquals(1, item.quality)
Exemplo n.º 2
0
 def test_remove_quality_on_sell_by_date(self):
     item = Item("Apple on the sell by date", 0 , 5)
     decrease_quality(item)
     self.assertEquals(3, item.quality)
Exemplo n.º 3
0
 def test_remove_quality_non_default_amount(self):
     items = [Item("Almost rotten apple", 0, 10)]
     decrease_quality(items[0], 5)
     self.assertEquals(5, items[0].quality)
Exemplo n.º 4
0
 def test_remove_quality_non_default_amount(self):
     items = [Item("Completely rotten apple", 0, 2)]
     decrease_quality(items[0], 50)
     self.assertEquals(0, items[0].quality)
Exemplo n.º 5
0
 def test_remove_quality_default(self):
     items = [Item("Iron Shield", 10, 10)]
     decrease_quality(items[0])
     self.assertEquals(9, items[0].quality)