test_InPortProvider.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- Python -*-
00003 
00004 #
00005 #  \file  test_InPortProvider.py
00006 #  \brief test for InPortProvider class
00007 #  \date  $Date: 2007/09/20 $
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 from InPortProvider import *
00025 import OpenRTM_aist
00026 
00027 
00028 class TestInPortProvider(unittest.TestCase):
00029   def setUp(self):
00030     return
00031 
00032   def tearDown(self):
00033     OpenRTM_aist.Manager.instance().shutdownManager()
00034     return
00035 
00036   def test_publishInterfaceProfile(self):
00037     InPortProviderFactory.instance().setInterfaceType("corba_cdr")
00038     InPortProviderFactory.instance().setDataFlowType("push,pull")
00039     InPortProviderFactory.instance().setSubscriptionType("flush,new,periodic")
00040     InPortProviderFactory.instance().publishInterfaceProfile([])
00041 
00042   def test_publishInterface(self):
00043     InPortProviderFactory.instance().setInterfaceType("corba_cdr")
00044     InPortProviderFactory.instance().setDataFlowType("push,pull")
00045     InPortProviderFactory.instance().setSubscriptionType("flush,new,periodic")
00046     self.assertEqual(InPortProviderFactory.instance().publishInterface([OpenRTM_aist.NVUtil.newNV("dataport.interface_type","corba_cdr")]),True)
00047 
00048 
00049 ############### test #################
00050 if __name__ == '__main__':
00051         unittest.main()


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