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

Add generic overloads to register and unregister value resolvers and comparers #1267

Conversation

kevinkuszyk
Copy link
Contributor

This is the PR for #1218.

As discussed there I've added generic overloads to register and unregister value resolvers and comparers.

I also updated:

  • the code where the defaults are registered to use the new generic overloads where possible
  • the worked example of using value resolvers and comparers.

If you'd prefer not not take the last two changes, I'll drop those commits.

When I was getting ready to push this code, I noticed @szaliszali has already made a start on this in #1260. I think I prefer the API changes there, but as noted they are breaking changes.

As this code was already done, I thought I may as well open a PR. If you prefer to go with the changes in #1260 thanks ok with me.

If you want to take this version, I'll update the changelog and docs.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added an entry to the changelog

@kevinkuszyk kevinkuszyk changed the title Add remove value comparer enhancements Add generic overloads to register and unregister value resolvers and comparers Sep 12, 2018
RegisterValueRetriever<GuidValueRetriever>();
RegisterValueRetriever<EnumValueRetriever>();
RegisterValueRetriever<TimeSpanValueRetriever>();
RegisterValueRetriever<DateTimeOffsetValueRetriever>();
RegisterValueRetriever(new NullableGuidValueRetriever());
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason you didn't change these calls?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think those were the ones without parameterless constructors. I didn't want to make extra changes to those.

It's all moot point anyway now, as it looks like they've been updated #1273.

@SabotageAndi SabotageAndi added this to the SpecFlow 3.0 milestone Sep 19, 2018
@SabotageAndi
Copy link
Contributor

Thanks for the PR!
But I close it, because #1260 was chosen.

@kevinkuszyk
Copy link
Contributor Author

No problem - I agree #1260 has a nicer api.

@kevinkuszyk kevinkuszyk deleted the add-remove-value-comparer-enhancements branch September 21, 2018 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants