test_SdoService.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 
4 #
5 # \file test_SdoService.py
6 # \brief test for SDO Service administration class
7 # \date $Date: 2007/09/12 $
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 
19 import sys
20 sys.path.insert(1,"../")
21 sys.path.insert(1,"../RTM_IDL")
22 
23 import unittest
24 
25 from SdoService import *
26 import OpenRTM_aist
27 
28 
29 class TestSDOServiceProfile(unittest.TestCase):
30  def setUp(self):
31  self.sdosp = SDOServiceProfile()
32 
33  def tearDown(self):
34  OpenRTM_aist.Manager.instance().shutdownManager()
35  return
36 
37  def test_getProfile(self):
38  sdosp = SDOServiceProfile("test", "test_type")
39  prof = sdosp.getProfile()
40  self.assertEqual(prof.id,"test")
41  self.assertEqual(prof.type,"test_type")
42 
43  def test_setName(self):
44  self.sdosp.setName("test")
45  self.assertEqual(self.sdosp.getName(),"test")
46 
47 
49  self.sdosp.setInterfaceType("test_type")
50  self.assertEqual(self.sdosp.getInterfaceType(),"test_type")
51 
52 
54  self.sdosp.setIdlDefinition("test_idl")
55  self.assertEqual(self.sdosp.getIdlDefinition(),"test_idl")
56 
57 
58  def test_setProperties(self):
59  self.sdosp.setProperties(None)
60  self.assertEqual(self.sdosp.getProperties(),None)
61 
62 
63  def test_setServiceRef(self):
64  self.sdosp.setServiceRef(None)
65  self.assertEqual(self.sdosp.getServiceRef(),None)
66 
67 
68 
69 if __name__ == '__main__':
70  unittest.main()


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Mon Feb 28 2022 23:01:07