test_NumberingPolicy.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 
4 #
5 # \file test_NumberingPolicy.py
6 # \brief Object numbering policy class
7 # \date $Date: 2007/08/23$
8 # \author Shinji Kurihara
9 #
10 # Copyright (C) 2006
11 # Task-intelligence Research Group,
12 # Intelligent Systems Research Institute,
13 # National Institute of
14 # Advanced Industrial Science and Technology (AIST), Japan
15 # All rights reserved.
16 #
17 
18 import sys
19 sys.path.insert(1,"../")
20 
21 import unittest
22 
23 from NumberingPolicy import *
24 import OpenRTM_aist
25 
26 
27 class TestDefaultNumberingPolicy(unittest.TestCase):
28  def setUp(self):
29  self.__dnp = DefaultNumberingPolicy()
30 
31  def tearDown(self):
32  OpenRTM_aist.Manager.instance().shutdownManager()
33  return
34 
35  def test_onCreate(self):
36  self.assertEqual(self.__dnp.onCreate("test0"),"0")
37  self.assertEqual(self.__dnp.onCreate("test1"),"1")
38  self.assertEqual(self.__dnp.onCreate("test1"),"2")
39 
40 
41 
42  def test_onDelete(self):
43  self.__dnp.onCreate("test")
44  self.__dnp.onCreate("test0")
45  self.__dnp.onDelete("test")
46  self.assertEqual(self.__dnp.onCreate("test1"),"0")
47  self.assertEqual(self.__dnp.onCreate("test"),"2")
48 
49 
50 
51  def test_find(self):
52  pass
53 
54 
55 ############### test #################
56 if __name__ == '__main__':
57  unittest.main()


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Jun 6 2019 19:11:34