Esempio n. 1
0
    def test_house_with_three_different_rooms(self):
        rectangle_room = task4.RectangleRoom(5, 20, 5)
        circle_room = task4.CircleRoom(5.6418959, 5)
        triangle_room = task4.TriangleRoom(15.196713713, 5)

        house = task4.House({rectangle_room, circle_room, triangle_room})

        self.assertEqual(round(house.calculate_volume()), 1500)
Esempio n. 2
0
    def test_house_with_no_rooms(self):
        house = task4.House({})

        self.assertEqual(house.calculate_volume(), 0)
Esempio n. 3
0
 def test_ctor(self):
     house = task4.House()
Esempio n. 4
0
    def test_house_with_triangle_room(self):
        room = task4.TriangleRoom(15.196713713, 5)

        house = task4.House({room})

        self.assertEqual(round(house.calculate_volume()), 500)
Esempio n. 5
0
    def test_house_with_circle_room(self):
        room = task4.CircleRoom(5.6418959, 5)

        house = task4.House({room})

        self.assertEqual(round(house.calculate_volume()), 500)
Esempio n. 6
0
    def test_house_with_rectangle_room(self):
        room = task4.RectangleRoom(5, 20, 5)

        house = task4.House({room})

        self.assertEqual(house.calculate_volume(), 500)