test_CorbaObjectManager.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- Python -*-
00003 
00004 #
00005 # \file test_CorbaObjManager.py
00006 # \brief test for CORBA Object manager class
00007 # \date $Date: 2007/08/27$
00008 # \author Shinji Kurihara
00009 #
00010 # Copyright (C) 2006
00011 #     Noriaki Ando
00012 #     Task-intelligence Research Group,
00013 #     Intelligent Systems Research Institute,
00014 #     National Institute of
00015 #         Advanced Industrial Science and Technology (AIST), Japan
00016 #     All rights reserved.
00017 #
00018 
00019 import sys
00020 sys.path.insert(1,"../")
00021 
00022 import unittest
00023 
00024 import OpenRTM_aist
00025 
00026 from omniORB import CORBA, PortableServer
00027 from CorbaObjectManager import *
00028 
00029 
00030 
00031 class test_comp(OpenRTM_aist.RTObject_impl):
00032         def __init__(self):
00033                 pass
00034                 
00035         def echo(self, msg):
00036                 print msg
00037                 return msg
00038                 
00039 
00040 class TestCorbaObjectManager(unittest.TestCase):
00041 
00042         def setUp(self):
00043                 self._orb = CORBA.ORB_init()
00044                 self._poa = self._orb.resolve_initial_references("RootPOA")
00045                 self._poa._get_the_POAManager().activate()
00046 
00047                 self._com = CorbaObjectManager(self._orb, self._poa)
00048 
00049                 self._obj = test_comp()
00050 
00051         def tearDown(self):
00052                 pass
00053 
00054 
00055         def test_activate(self):
00056                 self._com.activate(self._obj)
00057 
00058         def test_deactivate(self):
00059                 self._com.deactivate(self._obj)
00060 
00061 ############### test #################
00062 if __name__ == '__main__':
00063         unittest.main()


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Aug 27 2015 14:17:28