mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-26 01:38:57 +00:00
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
|
import unittest
|
||
|
|
||
|
from decimal import Decimal
|
||
|
|
||
|
from .FeelDecisionRunner import FeelDecisionRunner
|
||
|
|
||
|
|
||
|
class FeelLongOrDoubleDecisionTestClass(unittest.TestCase):
|
||
|
"""
|
||
|
Doc: https://docs.camunda.org/manual/7.7/user-guide/dmn-engine/
|
||
|
"""
|
||
|
|
||
|
@classmethod
|
||
|
def setUpClass(cls):
|
||
|
cls.runner = FeelDecisionRunner('long_or_double_decision_comparison_feel.dmn')
|
||
|
|
||
|
def test_long_or_double_decision_string_output1(self):
|
||
|
res = self.runner.decide({"Age":Decimal('30.5')})
|
||
|
self.assertEqual(res.description, '30.5 Row Annotation')
|
||
|
|
||
|
def test_long_or_double_decision_stringz_output2(self):
|
||
|
res = self.runner.decide({"Age":Decimal('25.3')})
|
||
|
self.assertEqual(res.description, 'L Row Annotation')
|
||
|
|
||
|
def test_long_or_double_decision_string_output3(self):
|
||
|
res = self.runner.decide({"Age":Decimal('25.4')})
|
||
|
self.assertEqual(res.description, 'H Row Annotation')
|
||
|
|
||
|
def suite():
|
||
|
return unittest.TestLoader().loadTestsFromTestCase(FeelLongOrDoubleDecisionTestClass)
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
unittest.TextTestRunner(verbosity=2).run(suite())
|