spiff-arena/tests/SpiffWorkflow/bpmn/ExclusiveGatewayIntoMultiInstanceTest.py
Jon Herron 0892db6fa7 Squashed 'SpiffWorkflow/' content from commit 63db3e4
git-subtree-dir: SpiffWorkflow
git-subtree-split: 63db3e45947ec66b8d0efc2c74064004f8ff482c
2022-10-12 10:19:53 -04:00

39 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
import sys
import os
import unittest
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
__author__ = 'matth'
class ExclusiveGatewayIntoMultiInstanceTest(BpmnWorkflowTestCase):
"""In the example BPMN Diagram we set x = 0, then we have an
exclusive gateway that should skip over a parallel multi-instance
class, so it should run straight through and complete without issue."""
def setUp(self):
spec, subprocesses = self.load_workflow_spec('exclusive_into_multi.bpmn','ExclusiveToMulti')
self.workflow = BpmnWorkflow(spec, subprocesses)
def testRunThroughHappy(self):
self.workflow.do_engine_steps()
self.assertTrue(self.workflow.is_completed())
def testSaveRestore(self):
self.workflow.do_engine_steps()
self.assertTrue(self.workflow.is_completed())
def suite():
return unittest.TestLoader().loadTestsFromTestCase(ExclusiveGatewayIntoMultiInstanceTest)
if __name__ == '__main__':
unittest.TextTestRunner(verbosity=2).run(suite())