Skip to content

@FileParameters does not respect quotes around columns in a CSV #167

@ticehix128

Description

@ticehix128

Version:

v 1.1.1

Contents of file test-cases.csv:

"CASE"
"CASE MULTIPLE WORDS"
"CASE MULTIPLE WORDS, WITH A COMMA"

Test method:


 @FileParameters(("classpath:test-cases.csv"))
  @Test
  public void testCase(final String singleColumnValue) {
      assertTrue(null != singleColumnValue);
  }

Expected:

All cases pass because it is legal and valid to include commas in CSV text if the column is quoted

Actual:

Cases where column contains comma fails with exception:

java.lang.IllegalArgumentException: Number of parameters inside @Parameters annotation doesn't match the number of test method parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions