-
Notifications
You must be signed in to change notification settings - Fork 0
/
paint_calculator_unit_testing.py
33 lines (25 loc) · 1.04 KB
/
paint_calculator_unit_testing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import unittest
from paint_calculator import PaintCalculator
class PaintCalculatorTests(unittest.TestCase):
#testing area of floor
def test_get_area_of_floor(self):
self.room1 = PaintCalculator(8, 8, 7)
self.assertEqual(self.room1.get_area_of_floor(), 64.00)
#testing area of windows
def test_area_of_windows(self):
self.room2 = PaintCalculator(10, 9, 7)
self.assertEqual(self.room2.get_area_of_windows(), 12.00)
#testing area of doors
def test_get_are_of_door(self):
self.room3 = PaintCalculator(12, 7, 7)
self.assertEqual(self.room3.get_are_of_door(), 6.00)
#testing quantity of required paint
def test_get_required_paint(self):
self.room4 = PaintCalculator(12, 8, 7)
self.assertEqual(self.room4.get_required_paint(), 53.64)
#testing volume of the rooom
def test_get_volume_of_room(self):
self.room5 = PaintCalculator(12, 10, 7)
self.assertEqual(self.room5.get_volume_of_room(), 840.00)
if __name__ == "__main__":
unittest.main()