示例#1
0
 def test_empty_constructor(self):
     item = Item()
     self.assertEqual("", item.get_name())
     self.assertEqual(0.0, item.get_price())
示例#2
0
 def test_constructor_with_name_and_price(self):
     item = Item("Corn Flakes", 3.95)
     self.assertEqual("Corn Flakes", item.get_name())
     self.assertEqual(3.95, item.get_price())
示例#3
0
 def test_constructor_with_name(self):
     item = Item("Corn Flakes")
     self.assertEqual("Corn Flakes", item.get_name())
     self.assertEqual(0.0, item.get_price())
 def test_constructor_with_name_and_price(self):
     item = Item("Corn Flakes", 3.95)
     self.assertEqual("Corn Flakes", item.get_name())
     self.assertEqual(3.95, item.get_price())
 def test_constructor_with_name(self):
     item = Item("Corn Flakes")
     self.assertEqual("Corn Flakes", item.get_name())
     self.assertEqual(0.0, item.get_price())
 def test_empty_constructor(self):
     item = Item()
     self.assertEqual("", item.get_name())
     self.assertEqual(0.0, item.get_price())