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 BufferStatus import *
00024
00025 class MyBuffer(BufferStatus):
00026 def __init__(self):
00027 pass
00028
00029 class TestBufferStatus(unittest.TestCase):
00030 def setUp(self):
00031 self.bf = MyBuffer()
00032
00033
00034 def test_toString(self):
00035 self.assertEqual(self.bf.toString(BufferStatus.BUFFER_OK),"BUFFER_OK")
00036 self.assertEqual(self.bf.toString(BufferStatus.BUFFER_ERROR),"BUFFER_ERROR")
00037 self.assertEqual(self.bf.toString(BufferStatus.BUFFER_FULL),"BUFFER_FULL")
00038 self.assertEqual(self.bf.toString(BufferStatus.BUFFER_EMPTY),"BUFFER_EMPTY")
00039 self.assertEqual(self.bf.toString(BufferStatus.NOT_SUPPORTED),"NOT_SUPPORTED")
00040 self.assertEqual(self.bf.toString(BufferStatus.TIMEOUT),"TIMEOUT")
00041 self.assertEqual(self.bf.toString(BufferStatus.PRECONDITION_NOT_MET),"PRECONDITION_NOT_MET")
00042
00043
00044
00045
00046 if __name__ == '__main__':
00047 unittest.main()