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

Adding StringComparison.InvariantCulture to IndexOf #421

Merged

Conversation

storno77
Copy link
Contributor

@storno77 storno77 commented Dec 12, 2024

Fixing issue #420 - adding StringComparison.InvariantCulture to IndexOf call, extending unittests to test this situation.

Copy link
Owner

@jamesmh jamesmh left a comment

Choose a reason for hiding this comment

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

Thanks for this! I've got a few changes to suggest here:

  1. First, there are other places within the cron expression code that will require the same fix. Notably, in the CronExpressionComplexPart class too.

  2. Because of this, I think the more appropriate approach to testing here is the following:

    1. Do the tests from SchedulerCronTests.cs instead so we can cover a broader range of cron expressions and internal logic to verify.
    2. Copy the existing 1 test (including all the InlineData attributes) and create a new test where you can assign a different culture to each of the cron expressions being tested and within the test code adjust the current culture - just like you did in your PR before these changes.

Let me know if that makes sense or if you need any help 👍

@storno77
Copy link
Contributor Author

Hi, I've pushed the changes you wanted, please check.

@jamesmh jamesmh merged commit c13f2c0 into jamesmh:master Dec 19, 2024
4 checks passed
@storno77 storno77 deleted the fix/420-exception-cron-entry-00-is-malformed branch December 19, 2024 15:04
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.

2 participants