Skip to content

adds TestValidateAsync extensions to utilize ValidationContext<T> arg - #2052

Merged
JeremySkinner merged 1 commit into
FluentValidation:mainfrom
engenb:test_extensions
Jan 19, 2023
Merged

adds TestValidateAsync extensions to utilize ValidationContext<T> arg#2052
JeremySkinner merged 1 commit into
FluentValidation:mainfrom
engenb:test_extensions

Conversation

@engenb

@engenb engenb commented Jan 18, 2023

Copy link
Copy Markdown
Contributor

Hey there @JeremySkinner , big fan of FluentValidation so I'm excited at the chance to make some sort of small contribution.

This simply adds some TestValidate overloads to allow utilizing the ValidationContext<T>. I need this in some unit tests to set up RootContextData before the validation is run.

The original TestValidate<T> just defers now to the new overload, and since the original TestValidate<T> is already being tested (and all tests still pass) I hope you agree that we get test coverage for free here and don't need to add additional (redundant) unit tests.

Thanks again

@dnfadmin

dnfadmin commented Jan 18, 2023

Copy link
Copy Markdown
Collaborator

CLA assistant check
All CLA requirements met.

@JeremySkinner
JeremySkinner merged commit c4ee149 into FluentValidation:main Jan 19, 2023
@JeremySkinner

Copy link
Copy Markdown
Member

Thanks!

@engenb
engenb deleted the test_extensions branch January 19, 2023 17:23
@JeremySkinner JeremySkinner added this to the 11.5 milestone Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants