0

在带有@CsvFileSource 的Junit 5 中使用@ParametrizedTest 时,我需要一个包含双引号的参数。我如何逃避这些,即我如何将exatly"a test"作为我的参数传递?

我试过的:

"a test"
""a test""
\"a test\"
"\"a test\""

参数转换为:

a test
""a test""
\"a test\"
"\"a test\""
4

1 回答 1

0

感谢@markspace 的评论,我注意到问题不是Junit 5,而是CSV 标准。所以我尝试在 LibreOffice 而不是文本编辑器中对其进行编辑,这给了我答案:

"""a test"""

结果:

"a test"
于 2020-05-30T00:29:48.823 回答