示例#1
0
    def test_list_of_selected_phones_buy(self):
        test = Purchase()
        test.select_cell_phone("Motorola G99")
        test.select_cell_phone("Motorola G99")
        test.unselect_cell_phone("Motorola G99")

        self.assertEqual(test.buy(),"Motorola G99 " )
示例#2
0
 def test_price_min_0_phone_lines(self):
     test = Purchase()
     self.assertNotEqual(test.decrement_phone_Lines(), -150)
示例#3
0
 def test_price_after_decrement_cell_lines(self):
     test = Purchase()
     test.increment_phone_Lines()
     test.increment_phone_Lines()
     self.assertEqual(test.decrement_phone_Lines(), 150)
示例#4
0
 def test_max_8_phone_lines(self):
     test = Purchase()
     for i in range(0, 8):
         test.increment_phone_Lines()
     self.assertNotEqual(test.phone_Lines, 9)
示例#5
0
 def test__phone_lines(self):
     test = Purchase()
     test.increment_phone_Lines()
     self.assertEqual(test.phone_Lines, 1)
示例#6
0
 def test_select_internet_connection1(self):
     test = Purchase()
     self.assertEqual(test.internet_Connections(True), 200)
示例#7
0
 def test_price_max_8_cell_lines(self):
     test = Purchase()
     for i in range(0, 8):
         test.increment_phone_Lines()
     self.assertNotEqual(test.increment_phone_Lines(), 1350)
示例#8
0
 def test_unselect_cellphone4(self):
     test = Purchase()
     self.assertEqual(test.unselect_cell_phone('Huawei 99'), -900)
示例#9
0
 def test_unselect_cellphone3(self):
     test = Purchase()
     self.assertEqual(test.unselect_cell_phone('Sony Xperia 99'), -900)
示例#10
0
 def test_unselect_cellphone2(self):
     test = Purchase()
     self.assertEqual(test.unselect_cell_phone('Samsung Galaxy 99'), -1000)
示例#11
0
 def test_unselect_cellphone1(self):
     test = Purchase()
     self.assertEqual(test.unselect_cell_phone('iPhone 99'), -6000)
示例#12
0
 def test_unselect_cellphone(self):
     test = Purchase()
     self.assertEqual(test.unselect_cell_phone('Motorola G99'), -800)
示例#13
0
 def test_buy_when_no_selected_phone(self):
     test = Purchase()
     self.assertEqual(test.buy(),"Please add something to the list" )
示例#14
0
 def test_select_internet_connection2(self):
     test = Purchase()
     self.assertEqual(test.internet_Connections(False), -200)