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

Recognize dates when generating steps #1958

Merged
merged 4 commits into from
May 5, 2020
Merged

Recognize dates when generating steps #1958

merged 4 commits into from
May 5, 2020

Conversation

304NotModified
Copy link
Contributor

@304NotModified 304NotModified commented Apr 26, 2020

Recognize dates when generating steps. Datetimes aren't supported yet

Supported formats:

The ones that will be successfully parsed by Datetime.TryParse and limited to the following separators: /, - and .

Examples:

  • 2030-12-23
  • 2030/12/23
  • 23-12-2030
  • 23.12.2030

Guidance needed

Please give me a glue if I could some more tests on a higher level. I'm not sure if I have covered all needed parts and how I could test the end result easily.

notes to reviewer

Added CaptureWithContext / ParameterType as there where clashes:

  • 23.12.2030 was successfully parsed with decimal.TryParse (unwanted)
  • 4.2 was successfully parsed with DateTime.TryParse (unwanted)

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. (most of the time mandatory)
  • I have added an entry to the changelog. (mandatory)
  • My change requires a change to the documentation. not sure
  • I have updated the documentation accordingly.

@304NotModified 304NotModified marked this pull request as ready for review April 26, 2020 19:11
@304NotModified 304NotModified marked this pull request as draft April 26, 2020 19:11
@304NotModified 304NotModified marked this pull request as ready for review April 26, 2020 22:36
Copy link
Contributor

@SabotageAndi SabotageAndi left a comment

Choose a reason for hiding this comment

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

Cool solution with the CaptureWithContext and the ParameterType.
I made a little change with the order of a check and removed the changelog entry, as this change has not yet an influence on the usage.

But this change increased my motivation to find a solution what we are doing with the VS Extension and its old SpecFlow version.

@SabotageAndi
Copy link
Contributor

If you didn't already, please fill out the form here so that we can send you some stickers as thank you.

@SabotageAndi SabotageAndi merged commit cf2b7cb into SpecFlowOSS:master May 5, 2020
@304NotModified 304NotModified deleted the RecognizeDates branch May 5, 2020 14:23
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.

None yet

2 participants