Added missing tests for TextDelegate
removed assert checks in production code