From 23f163cc488032ecdee6688806d6540e4a1ff8cc Mon Sep 17 00:00:00 2001 From: fdai7783 Date: Thu, 18 Jan 2024 20:22:38 +0100 Subject: [PATCH] Added one test and basic addition functionality to fulfill it --- src/main/py/primitive_calculations.py | 2 ++ src/test/py/test_primitive_calculations.py | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/main/py/primitive_calculations.py create mode 100644 src/test/py/test_primitive_calculations.py diff --git a/src/main/py/primitive_calculations.py b/src/main/py/primitive_calculations.py new file mode 100644 index 0000000..79558e7 --- /dev/null +++ b/src/main/py/primitive_calculations.py @@ -0,0 +1,2 @@ +def add(first_number, second_number): + return first_number + second_number diff --git a/src/test/py/test_primitive_calculations.py b/src/test/py/test_primitive_calculations.py new file mode 100644 index 0000000..dce1530 --- /dev/null +++ b/src/test/py/test_primitive_calculations.py @@ -0,0 +1,17 @@ +import unittest +from src.main.py.primitive_calculations import * + + +class primitive_calculations(unittest.TestCase): + def setUp(self): + pass + + def tearDown(self): + pass + + def test_add_5_plu_5_equals_10(self): + self.assertEqual(add(5, 5), 10) + + +if __name__ == "__main__": + unittest.main()