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

Test successful

parent c64b2ce1
Branches feature/handle_one_number
No related tags found
No related merge requests found
Pipeline #20015 passed
......@@ -23,6 +23,9 @@ class StringCalculator(IStringCalculator):
'''Leere Eingabe soll 0 ausgeben'''
if numbers == "":
return 0
'''Eingabe einer Zahl als String soll den Integer Wert ausgeben'''
return int(numbers)
class TestStringCalculator(unittest.TestCase):
def setUp(self):
......@@ -32,5 +35,9 @@ class TestStringCalculator(unittest.TestCase):
res = self.c.add("")
self.assertEqual(res, 0)
def test_oneNumber(self):
res = self.c.add("1")
self.assertEqual(res, 1)
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
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