Reputation: 7133
I am using @CsvFileSource
annotation of JUnit 5 to parameterize my test cases, but I am not able to ignore the comments from in the CSV file.
Any thoughts on how to do this?
Example CSV:
apple fruit sweet
carrot vegetable sweet
// lemon vegetable sour (Ignore this)
banana fruit sweet
Upvotes: 3
Views: 1314
Reputation: 3468
Use a #
at the beginning of the comment lines:
apple, fruit, sweet
carrot, vegetable, sweet
# lemon, vegetable, sour
banana, fruit, sweet
Upvotes: 6