Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertCsv: Add support to ignore column via index when CSV Headers are missing #155

Open
ClementVaillantCodit opened this issue Jul 5, 2024 · 0 comments · May be fixed by #161
Open

AssertCsv: Add support to ignore column via index when CSV Headers are missing #155

ClementVaillantCodit opened this issue Jul 5, 2024 · 0 comments · May be fixed by #161
Assignees
Labels
area:assert All issues related to comparing values in tests enhancement New feature or request
Projects
Milestone

Comments

@ClementVaillantCodit
Copy link
Contributor

ClementVaillantCodit commented Jul 5, 2024

When I use:

AssertCsv.Equal(expectedOutputFileContent, outputFileContent, opt =>
{
    opt.Separator = ';';
    opt.RowOrder = AssertCsvOrder.Ignore;
    opt.Header = AssertCsvHeader.Missing;
    opt.IgnoreColumn("DateTime");
});

then opt.IgnoreColumn("DateTime"); is useless since headers are not present in CSV.

I suggest to create a new option IgnoreColumnByIndex(2), while precising if it's 0 or 1-based index in the documentation.
Using opt.IgnoreColumnByIndex(0) should not be allowed if opt.ColumnOrder is set to AssertCsvOrder.Ignore.

@stijnmoreels stijnmoreels added this to To do in Roadmap via automation Jul 8, 2024
@stijnmoreels stijnmoreels added this to the v1.1 milestone Jul 8, 2024
@stijnmoreels stijnmoreels added enhancement New feature or request area:assert All issues related to comparing values in tests labels Jul 8, 2024
@stijnmoreels stijnmoreels changed the title AssertCsv: Add support to ignore column via index when CSV Headers are missing AssertCsv: Add support to ignore column via index when CSV Headers are missing Jul 8, 2024
@ClementVaillantCodit ClementVaillantCodit self-assigned this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:assert All issues related to comparing values in tests enhancement New feature or request
Projects
Roadmap
  
To do
Development

Successfully merging a pull request may close this issue.

2 participants