|
@@ -22,10 +22,21 @@ class testShowError(unittest.TestCase):
|
|
|
# pass the predefined message into alert_message function.
|
|
|
result = Impl.display_message(self, message)
|
|
|
|
|
|
+import app
|
|
|
+
|
|
|
+# testing Show Error function
|
|
|
+class testShowError(unittest.TestCase):
|
|
|
+ def runTest(self):
|
|
|
+ # initialize value to message variable.
|
|
|
+ message = str("Here is a warning message.")
|
|
|
+
|
|
|
+ # pass the predefined message into alert_message function.
|
|
|
+ result = app.alert_message(message)
|
|
|
+
|
|
|
# check if the two values in the parameter are matched.
|
|
|
self.assertEqual(result, message)
|
|
|
|
|
|
-# class starter.
|
|
|
+# class starter
|
|
|
if __name__ == '__main__':
|
|
|
unittest.main()
|
|
|
|