def test_get_type(self): """get_type()""" # Check whether the returned content self.ctype. It must be # manually set as the base class constructor self.ctype # argument is not configurable. symbol = b_Symbol("symbol", 1) symbol.ctype = 0 self.assertTrue(symbol.ctype == 0)
def test_set_text(self): """set_text()""" # Check whether the parameter is assigned the contents of text # into self._text methods. symbol = b_Symbol("symbol", 1) self.assertTrue(symbol._text == "symbol") symbol.set_text("other symbol") self.assertTrue(symbol._text == "other symbol")
def test_set_id(self): """set_id()""" # Method set_id(new_id): # Check whether the content of parameter new_id is assigned to the # self._id. symbol = b_Symbol("symbol", 1) self.assertTrue(symbol._id == 1) symbol.set_id(25) self.assertTrue(symbol._id == 25)
def test_get_id(self): """get_id()""" # Check whether the returned content self._id. symbol = b_Symbol("symbol", 1) self.assertTrue(symbol.get_id() == 1) self.assertTrue(symbol.get_id() == symbol._id)
def test_get_text(self): """get_text()""" # Check whether the returned content self._text. symbol = b_Symbol("symbol", 1) self.assertTrue(symbol.get_text() == "symbol") self.assertTrue(symbol.get_text() == symbol._text)