Skip to content
Snippets Groups Projects
Commit 6c1ba095 authored by Daniel Rafeh's avatar Daniel Rafeh
Browse files

Test 15/17 erfolgreich

parent 24a8bbce
No related branches found
No related tags found
2 merge requests!4Main,!2Main to develop
...@@ -30,6 +30,9 @@ class Converter(IConverter): ...@@ -30,6 +30,9 @@ class Converter(IConverter):
roman_str = '' roman_str = ''
if num == 0:
return "Es gibt keine römische Null"
for value, numeral in roman_numbers: for value, numeral in roman_numbers:
while num >= value: while num >= value:
...@@ -98,6 +101,10 @@ class TestConverter(unittest.TestCase): ...@@ -98,6 +101,10 @@ class TestConverter(unittest.TestCase):
res = self.c.convert(99) res = self.c.convert(99)
self.assertEqual(res, 'XCIX') self.assertEqual(res, 'XCIX')
def test_convertZero(self):
res = self.c.convert(0)
self.assertEqual(res, 'Es gibt keine römische Null')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment