mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-18 21:41:04 +00:00
0892db6fa7
git-subtree-dir: SpiffWorkflow git-subtree-split: 63db3e45947ec66b8d0efc2c74064004f8ff482c
29 lines
881 B
Python
29 lines
881 B
Python
import unittest
|
|
|
|
from .PythonDecisionRunner import PythonDecisionRunner
|
|
|
|
|
|
class BoolDecisionTestClass(unittest.TestCase):
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
cls.runner = PythonDecisionRunner('bool_decision.dmn')
|
|
|
|
def test_bool_decision_string_output1(self):
|
|
res = self.runner.decide({'input': True})
|
|
self.assertEqual(res.description, 'Y Row Annotation')
|
|
|
|
def test_bool_decision_string_output2(self):
|
|
res = self.runner.decide({'input': False})
|
|
self.assertEqual(res.description, 'N Row Annotation')
|
|
|
|
def test_bool_decision_string_output3(self):
|
|
res = self.runner.decide(None)
|
|
self.assertEqual(res.description, 'ELSE Row Annotation')
|
|
|
|
def suite():
|
|
return unittest.TestLoader().loadTestsFromTestCase(BoolDecisionTestClass)
|
|
|
|
if __name__ == '__main__':
|
|
unittest.TextTestRunner(verbosity=2).run(suite())
|