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

Test successful

parent 0abc35ce
No related branches found
No related tags found
No related merge requests found
Pipeline #20053 passed
......@@ -14,6 +14,7 @@
# Bei der Eingabe "2, 1001, 5" soll die Zahl 7 ausgegeben werden
# Bei der Eingabe von Texten mit leeren Trennzeichen (z.B. "//;\n") soll die Zahl 0 ausgegeben werden
# Bei der Eingabe von "1, " soll die Zahl 1 ausgegeben werden
# Bei der Eingabe von "-2, 5" soll "negatives not allowed" ausgegeben werden
import unittest
from abc import ABC, abstractmethod
......@@ -157,5 +158,9 @@ class TestStringCalculator(unittest.TestCase):
res = self.c.add("1,")
self.assertEqual(res, 1)
def test_negative_with_positive(self):
res = self.c.add("-2, 5")
self.assertEqual(res, "negatives not allowed")
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