Exemplo n.º 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 " )
Exemplo n.º 2
0
 def test_price_min_0_phone_lines(self):
     test = Purchase()
     self.assertNotEqual(test.decrement_phone_Lines(), -150)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 5
0
 def test__phone_lines(self):
     test = Purchase()
     test.increment_phone_Lines()
     self.assertEqual(test.phone_Lines, 1)
Exemplo n.º 6
0
 def test_select_internet_connection1(self):
     test = Purchase()
     self.assertEqual(test.internet_Connections(True), 200)
Exemplo n.º 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)
Exemplo n.º 8
0
 def test_unselect_cellphone4(self):
     test = Purchase()
     self.assertEqual(test.unselect_cell_phone('Huawei 99'), -900)
Exemplo n.º 9
0
 def test_unselect_cellphone3(self):
     test = Purchase()
     self.assertEqual(test.unselect_cell_phone('Sony Xperia 99'), -900)
Exemplo n.º 10
0
 def test_unselect_cellphone2(self):
     test = Purchase()
     self.assertEqual(test.unselect_cell_phone('Samsung Galaxy 99'), -1000)
Exemplo n.º 11
0
 def test_unselect_cellphone1(self):
     test = Purchase()
     self.assertEqual(test.unselect_cell_phone('iPhone 99'), -6000)
Exemplo n.º 12
0
 def test_unselect_cellphone(self):
     test = Purchase()
     self.assertEqual(test.unselect_cell_phone('Motorola G99'), -800)
Exemplo n.º 13
0
 def test_buy_when_no_selected_phone(self):
     test = Purchase()
     self.assertEqual(test.buy(),"Please add something to the list" )
Exemplo n.º 14
0
 def test_select_internet_connection2(self):
     test = Purchase()
     self.assertEqual(test.internet_Connections(False), -200)