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

feat: Add support to ignore column via index when CSV Headers are missing #161

Conversation

ClementVaillantCodit
Copy link
Contributor

@ClementVaillantCodit ClementVaillantCodit commented Jul 12, 2024

Added option IgnoreColumnIndex(int index) that allows to ignore a column via its index. Useful when headers are missing and we still want to ignore a column.

Added a validation to make sure that validation fails when opt.ColumnOrder is set to AssertCsvOrder.Ignore and it is used together with IgnoreColumnIndex(int index).

Closes #155

… using this option alongside with ColumnOrder = Ignore
@ClementVaillantCodit ClementVaillantCodit requested a review from a team as a code owner July 12, 2024 08:54
@ClementVaillantCodit ClementVaillantCodit added the area:assert All issues related to comparing values in tests label Jul 12, 2024
Copy link

netlify bot commented Jul 12, 2024

Deploy Preview for arcus-testing canceled.

Name Link
🔨 Latest commit d8ba498
🔍 Latest deploy log https://app.netlify.com/sites/arcus-testing/deploys/6691248cfd5b5d0008c548e4

@ClementVaillantCodit ClementVaillantCodit added the enhancement New feature or request label Jul 12, 2024
@ClementVaillantCodit
Copy link
Contributor Author

@stijnmoreels any additional tests you can think about for this?

Copy link
Member

@stijnmoreels stijnmoreels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats w/ your first code contribution! 🎉💃
It's a great one to get you familiar with the current code base - real added value, too.

Only some small changes, but overal great use of existing style and logic in both tests and implementation. Splendid! 🎖️

src/Arcus.Testing.Assert/AssertCsv.cs Outdated Show resolved Hide resolved
src/Arcus.Testing.Assert/AssertCsv.cs Outdated Show resolved Hide resolved
src/Arcus.Testing.Assert/AssertCsv.cs Outdated Show resolved Hide resolved
src/Arcus.Testing.Tests.Unit/Assert_/AssertCsvTests.cs Outdated Show resolved Hide resolved
src/Arcus.Testing.Tests.Unit/Assert_/AssertCsvTests.cs Outdated Show resolved Hide resolved
src/Arcus.Testing.Tests.Unit/Assert_/AssertCsvTests.cs Outdated Show resolved Hide resolved
src/Arcus.Testing.Assert/AssertCsv.cs Outdated Show resolved Hide resolved
src/Arcus.Testing.Assert/AssertCsv.cs Outdated Show resolved Hide resolved
@stijnmoreels stijnmoreels changed the title Add support to ignore column via index when CSV Headers are missing feat: Add support to ignore column via index when CSV Headers are missing Jul 12, 2024
@stijnmoreels
Copy link
Member

/azp run CI - Arcus.Testing

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stijnmoreels stijnmoreels merged commit ec39775 into main Jul 15, 2024
13 checks passed
@stijnmoreels stijnmoreels deleted the 155-assertcsv-add-support-to-ignore-column-via-index-when-csv-headers-are-missing branch July 15, 2024 10:17
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
None yet
Development

Successfully merging this pull request may close these issues.

AssertCsv: Add support to ignore column via index when CSV Headers are missing
2 participants