Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unit testing Grails单元测试比较字符串编码错误_Unit Testing_Grails_Encoding_Utf 8_Groovy - Fatal编程技术网

Unit testing Grails单元测试比较字符串编码错误

Unit testing Grails单元测试比较字符串编码错误,unit-testing,grails,encoding,utf-8,groovy,Unit Testing,Grails,Encoding,Utf 8,Groovy,我下面有一个单元测试失败了,可能是因为我不知道如何解决编码问题。class和messages.properties文件都是UTF-8编码的。我在eclipse中签入了文件属性 assert mobileResponse.toMobile().data.get('mobile_error_description') == 'Usuário e/ou senha inexistentes e/ou inválidos.' 控制台输出为: assert mobileResponse.toMobile

我下面有一个单元测试失败了,可能是因为我不知道如何解决编码问题。class和messages.properties文件都是UTF-8编码的。我在eclipse中签入了文件属性

assert mobileResponse.toMobile().data.get('mobile_error_description') == 'Usuário e/ou senha inexistentes e/ou inválidos.'
控制台输出为:

assert mobileResponse.toMobile().data.get('mobile_error_description') == "Usu√°rio e/ou senha inexistentes e/ou inv√°lidos."
                                                                      |false
可能是这只虫子吗?