def test_draw_map_outline_type_of_return(self): """Test draw_map if it returns a list properly. The result is expected True """ map.set_map_size(10) map_outline = map.draw_map_outline() self.assertEqual(list, type(map_outline))
def test_draw_map_outline_length_of_list(self): """Test draw_map if it creates valid length of list based on map_size. The result is expected True """ map.set_map_size(10) map_outline = map.draw_map_outline() self.assertEqual(10, len(map_outline))
def test_draw_map_outline_value_of_each_dict(self): """Test draw_map_outline if it contains valid value in each dictionary. The result is expected True """ map.set_map_size(10) map_outline = map.draw_map_outline() map_value = map_outline[0][0, 0] self.assertEqual(' ', map_value)
def test_draw_map_outline_type_of_elements(self): """Test draw_map if it contains valid dictionary elements. The result is expected True """ map.set_map_size(10) map_outline = map.draw_map_outline() map_elements = map_outline[0] self.assertEqual(dict, type(map_elements))
def test_draw_last_line_map_length_of_list(self): """Test draw_last_line_map if it returns valid length of list based on map_size. The result is expected True """ map.set_map_size(5) map_outline = map.draw_map_outline() last_line = map.draw_last_line_map(map_outline) self.assertEqual(5, len(last_line))
def test_draw_last_line_map_type_of_return(self): """Test draw_last_line_map if the type of return is valid. The result is expected True """ map.set_map_size(5) map_outline = map.draw_map_outline() last_line = map.draw_last_line_map(map_outline) self.assertEqual(list, type(last_line))
def test_draw_map_user_location(self): """Test draw_map if it writes the location of user properly. The result is expected True """ map.set_map_size(3) map_lines = map.draw_map_outline() drawn_map = map.draw_map(map_lines, self.test_dict) self.assertEqual('[O]', drawn_map[2][2, 2])
def test_draw_map_length_of_list(self): """Test draw_map if the length of returned list is valid. The result is expected True """ map.set_map_size(3) map_lines = map.draw_map_outline() drawn_map = map.draw_map(map_lines, self.test_dict) self.assertEqual(3, len(drawn_map))
def test_draw_map_type_of_return(self): """Test draw_map if it returns valid list. The result is expected True """ map.set_map_size(3) map_lines = map.draw_map_outline() drawn_map = map.draw_map(map_lines, self.test_dict) self.assertEqual(list, type(drawn_map))