Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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
00056 if __name__ == '__main__':
00057 unittest.main()