我使用JUnit 5的@CsvFileSource
注释来参数化我的测试用例,但我无法忽略CSV文件中的注释。
有关如何做到这一点的任何想法?
示例CSV:
apple fruit sweet
carrot vegetable sweet
// lemon vegetable sour (Ignore this)
banana fruit sweet
在注释行的开头使用#
:
apple, fruit, sweet
carrot, vegetable, sweet
# lemon, vegetable, sour
banana, fruit, sweet