test_NumberingPolicy.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- Python -*-
00003 
00004 #
00005 # \file test_NumberingPolicy.py
00006 # \brief Object numbering policy class
00007 # \date $Date: 2007/08/23$
00008 # \author Shinji Kurihara
00009 #
00010 # Copyright (C) 2006
00011 #     Task-intelligence Research Group,
00012 #     Intelligent Systems Research Institute,
00013 #     National Institute of
00014 #         Advanced Industrial Science and Technology (AIST), Japan
00015 #     All rights reserved.
00016 #
00017 
00018 import sys
00019 sys.path.insert(1,"../")
00020 
00021 import unittest
00022 
00023 from NumberingPolicy import *
00024 import OpenRTM_aist
00025 
00026 
00027 class TestDefaultNumberingPolicy(unittest.TestCase):
00028   def setUp(self):
00029     self.__dnp = DefaultNumberingPolicy()
00030 
00031   def tearDown(self):
00032     OpenRTM_aist.Manager.instance().shutdownManager()
00033     return
00034 
00035   def test_onCreate(self):
00036     self.assertEqual(self.__dnp.onCreate("test0"),"0")
00037     self.assertEqual(self.__dnp.onCreate("test1"),"1")
00038     self.assertEqual(self.__dnp.onCreate("test1"),"2")
00039 
00040 
00041   
00042   def test_onDelete(self):
00043     self.__dnp.onCreate("test")
00044     self.__dnp.onCreate("test0")
00045     self.__dnp.onDelete("test")
00046     self.assertEqual(self.__dnp.onCreate("test1"),"0")
00047     self.assertEqual(self.__dnp.onCreate("test"),"2")
00048     
00049 
00050 
00051   def test_find(self):
00052     pass
00053   
00054 
00055 ############### test #################
00056 if __name__ == '__main__':
00057         unittest.main()


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