def setUp(self):
     config = ''
     config += '<config>\n'
     config += '    <system>\n'
     config += '        <name>system1</name>\n'
     config += '        <params>\n'
     config += '            <param1>value1</param1>\n'
     config += '            <param2>value2</param2>\n'
     config += '            <param3/>\n'
     config += '        </params>\n'
     config += '        <fsm>\n'
     config += '            <name>fsm1</name>\n'
     config += '            <state> <name>state1</name> </state>\n'
     config += '            <state> <name>state2</name> </state>\n'
     config += '        </fsm>\n'
     config += '    </system>\n'
     config += '    <system>\n'
     config += '        <name>system2</name>\n'
     config += '    </system>\n'
     config += '</config>\n'
     uids = ['uid1', 'uid2', 'uid3', 'uid4', 'uid5']
     uids.reverse()
     uidsProvider = TestUidProvider(uids)
     self.app = draft.Application(config=config, uid=uidsProvider)
     self.app2 = draft.Application(config=config, uid=uidsProvider)
 def setUp(self):
     config = ''
     config += '<config>\n'
     config += '    <system>\n'
     config += '        <name>system1</name>\n'
     config += '        <params>\n'
     config += '            <param1>value1</param1>\n'
     config += '        </params>\n'
     config += '    </system>\n'
     config += '</config>\n'
     uids = ['uid1']
     uids.reverse()
     uidsProvider = TestUidProvider(uids)
     self.app = draft.Application(config=config, uid=uidsProvider)
 def setUp(self):
     config = ''
     config += '<config>\n'
     config += '    <test>\n'
     config += '        <test1>test1</test1>\n'
     config += '        <test2>test2</test2>\n'
     config += '    </test>\n'
     config += '    <system>\n'
     config += '        <name>system1</name>\n'
     config += '        <params>\n'
     config += '            <param1/>\n'
     config += '            <param2/>\n'
     config += '        </params>\n'
     config += '        <fsm>\n'
     config += '            <name>fsm1</name>\n'
     config += '            <state>\n'
     config += '                <name>initial</name>\n'
     config += '                <on_input>\n'
     config += '                    <inputs>\n'
     config += '                        <are_equal> <param>param1</param> <xpath>/world/config/test/test1/text()</xpath> </are_equal>\n'
     config += '                        <are_equal> <param>param2</param> <xpath>/world/config/test/test2/text()</xpath> </are_equal>\n'
     config += '                    </inputs>\n'
     config += '                    <actions>\n'
     config += '                        <send_message> <name>message1</name> </send_message>\n'
     config += '                    </actions>\n'
     config += '                </on_input>\n'
     config += '                <on_input>\n'
     config += '                    <inputs> <are_equal> <param>param1</param> <xpath>/world/config/test/test1/text()</xpath> </are_equal> </inputs>\n'
     config += '                    <inputs> <are_equal> <param>param2</param> <xpath>/world/config/test/test2/text()</xpath> </are_equal> </inputs>\n'
     config += '                    <actions>\n'
     config += '                        <send_message> <name>message2</name> </send_message>\n'
     config += '                    </actions>\n'
     config += '                </on_input>\n'
     config += '            </state>\n'
     config += '        </fsm>\n'
     config += '    </system>\n'
     config += '</config>\n'
     uids = ['uid1']
     uids.reverse()
     uidsProvider = TestUidProvider(uids)
     self.app = draft.Application(config=config, uid=uidsProvider)
     spawnSystems(self.app, name='system1')
     self.system = getSystems(self.app).pop()
     self.fsm = self.system.getFsms().pop()
 def setUp(self):
     config = ''
     config += '<config>\n'
     config += '    <system>\n'
     config += '        <name>system1</name>\n'
     config += '        <fsm>\n'
     config += '            <name>fsm1</name>\n'
     config += '            <state> <name>state1</name> </state>\n'
     config += '            <state> <name>state2</name> </state>\n'
     config += '        </fsm>\n'
     config += '        <fsm>\n'
     config += '            <name>fsm2</name>\n'
     config += '            <state> <name>state1</name> </state>\n'
     config += '            <state> <name>state2</name> </state>\n'
     config += '        </fsm>\n'
     config += '    </system>\n'
     config += '</config>\n'
     uids = ['uid1']
     uids.reverse()
     uidsProvider = TestUidProvider(uids)
     self.app = draft.Application(config=config, uid=uidsProvider)
 def setUp(self):
     config = ''
     config += '<config>\n'
     config += '    <test>\n'
     config += '        <test1>test1</test1>\n'
     config += '        <test2>test2</test2>\n'
     config += '        <param1>\n'
     config += '            <value>test11</value>\n'
     config += '            <value>test12</value>\n'
     config += '        </param1>\n'
     config += '        <param2>\n'
     config += '            <value>test21</value>\n'
     config += '            <value>test22</value>\n'
     config += '        </param2>\n'
     config += '    </test>\n'
     config += '    <system>\n'
     config += '        <name>system1</name>\n'
     config += '        <params>\n'
     config += '            <param1>value1</param1>\n'
     config += '            <param2>value2</param2>\n'
     config += '            <param3/>\n'
     config += '        </params>\n'
     config += '    </system>\n'
     config += '    <system>\n'
     config += '        <name>system2</name>\n'
     config += '        <params>\n'
     config += '            <param1>value1</param1>\n'
     config += '            <param2>value22</param2>\n'
     config += '            <param3/>\n'
     config += '        </params>\n'
     config += '    </system>\n'
     config += '</config>\n'
     uids = ['uid1', 'uid2', 'uid3', 'uid4', 'uid5']
     uids.reverse()
     uidsProvider = TestUidProvider(uids)
     self.app = draft.Application(config=config, uid=uidsProvider)
 def setUp(self):
     config = ''
     config += '<config>\n'
     config += '    <test>\n'
     config += '        <test1>test1</test1>\n'
     config += '    </test>\n'
     config += '    <system>\n'
     config += '        <name>system1</name>\n'
     config += '        <params>\n'
     config += '            <param1/>\n'
     config += '        </params>\n'
     config += '        <fsm>\n'
     config += '            <name>fsm1</name>\n'
     config += '            <state>\n'
     config += '                <name>initial</name>\n'
     config += '                <transition>\n'
     config += '                    <to_state>state1</to_state>\n'
     config += '                </transition>\n'
     config += '            </state>\n'
     config += '            <state>\n'
     config += '                <name>state1</name>\n'
     config += '                <on_entry>\n'
     config += '                    <send_message> <name>message1</name> </send_message>\n'
     config += '                    <set_param> <name>param1</name> <value><xpath>/world/config/test/test1/text()</xpath></value> </set_param>\n'
     config += '                </on_entry>\n'
     config += '                <on_input>\n'
     config += '                    <inputs>\n'
     config += '                        <are_equal> <param>param1</param> <xpath>/world/config/test/test1/text()</xpath> </are_equal>\n'
     config += '                    </inputs>\n'
     config += '                    <actions>\n'
     config += '                        <send_message> <name>message3</name> </send_message>\n'
     config += '                    </actions>\n'
     config += '                </on_input>\n'
     config += '                <transition>\n'
     config += '                    <inputs>\n'
     config += '                        <are_equal> <param>param1</param> <xpath>/world/config/test/test1/text()</xpath> </are_equal>\n'
     config += '                    </inputs>\n'
     config += '                    <to_state>state2</to_state>\n'
     config += '                </transition>\n'
     config += '            </state>\n'
     config += '            <state>\n'
     config += '                <name>state2</name>\n'
     config += '                <on_entry>\n'
     config += '                    <send_message> <name>message4</name> </send_message>\n'
     config += '                </on_entry>\n'
     config += '            </state>\n'
     config += '        </fsm>\n'
     config += '    </system>\n'
     config += '    <system>\n'
     config += '        <name>system2</name>\n'
     config += '        <fsm>\n'
     config += '            <name>fsm1</name>\n'
     config += '            <state>\n'
     config += '                <name>initial</name>\n'
     config += '                <transition>\n'
     config += '                    <to_state>state1</to_state>\n'
     config += '                </transition>\n'
     config += '            </state>\n'
     config += '            <state>\n'
     config += '                <name>state1</name>\n'
     config += '                <on_entry>\n'
     config += '                    <send_message> <name>message2</name> </send_message>\n'
     config += '                </on_entry>\n'
     config += '            </state>\n'
     config += '        </fsm>\n'
     config += '    </system>\n'
     config += '</config>\n'
     uids = ['uid1', 'uid2']
     uids.reverse()
     uidsProvider = TestUidProvider(uids)
     self.app = draft.Application(config=config, uid=uidsProvider)