-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_decimal_to_roman.py
93 lines (70 loc) · 2.89 KB
/
test_decimal_to_roman.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import unittest
from decimal_to_roman import DecimalToRoman
class TestDecimalToRoman(unittest.TestCase):
def setUp(self):
self.objeto = DecimalToRoman()
def test_decimal_to_roman_0(self):
result = self.objeto.decimal_to_roman(0)
self.assertEquals(result, '')
def test_decimal_to_roman_1(self):
result = self.objeto.decimal_to_roman(1)
self.assertEquals(result, 'I')
def test_decimal_to_roman_2(self):
result = self.objeto.decimal_to_roman(2)
self.assertEquals(result, 'II')
def test_decimal_to_roman_3(self):
result = self.objeto.decimal_to_roman(3)
self.assertEquals(result, 'III')
def test_decimal_to_roman_4(self):
result = self.objeto.decimal_to_roman(4)
self.assertEquals(result, 'IV')
def test_decimal_to_roman_5(self):
result = self.objeto.decimal_to_roman(5)
self.assertEquals(result, 'V')
def test_decimal_to_roman_6(self):
result = self.objeto.decimal_to_roman(6)
self.assertEquals(result, 'VI')
def test_decimal_to_roman_7(self):
result = self.objeto.decimal_to_roman(7)
self.assertEquals(result, 'VII')
def test_decimal_to_roman_8(self):
result = self.objeto.decimal_to_roman(8)
self.assertEquals(result, 'VIII')
def test_decimal_to_roman_9(self):
result = self.objeto.decimal_to_roman(9)
self.assertEquals(result, 'IX')
def test_decimal_to_roman_10(self):
result = self.objeto.decimal_to_roman(10)
self.assertEquals(result, 'X')
def test_decimal_to_roman_11(self):
result = self.objeto.decimal_to_roman(11)
self.assertEquals(result, 'XI')
def test_decimal_to_roman_12(self):
result = self.objeto.decimal_to_roman(12)
self.assertEquals(result, 'XII')
def test_decimal_to_roman_13(self):
result = self.objeto.decimal_to_roman(13)
self.assertEquals(result, 'XIII')
def test_decimal_to_roman_14(self):
result = self.objeto.decimal_to_roman(14)
self.assertEquals(result, 'XIV')
def test_decimal_to_roman_15(self):
result = self.objeto.decimal_to_roman(15)
self.assertEquals(result, 'XV')
def test_decimal_to_roman_16(self):
result = self.objeto.decimal_to_roman(16)
self.assertEquals(result, 'XVI')
def test_decimal_to_roman_17(self):
result = self.objeto.decimal_to_roman(17)
self.assertEquals(result, 'XVII')
def test_decimal_to_roman_18(self):
result = self.objeto.decimal_to_roman(18)
self.assertEquals(result, 'XVIII')
def test_decimal_to_roman_19(self):
result = self.objeto.decimal_to_roman(19)
self.assertEquals(result, 'XIX')
def test_decimal_to_roman_20(self):
result = self.objeto.decimal_to_roman(20)
self.assertEquals(result, 'XX')
if __name__ == "__main__":
unittest.main()