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

Cherry-pick (7d5c6c5): Fix for Error occurs when you check whether a string or integer literal is in an enum collection #3039

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

WanjohiSammy
Copy link
Contributor

Description

Cherry-pick 7d5c6c5

Checklist (Uncheck if it is not completed)

  • Test cases added
  • Test case modified
  • Build and test with one-click build and test script passed

…al is in an enum collection (#3023)

* Refactor InBinder to convert left operand to enum type if necessary

* Add tests for filter with In Operator with enums member names and member integral values

* Add more functional tests for parseFilter with 'In' Operation with Enums

* Add a failed tests when Float are used as enum integral value with In Operator

* Add parse filter test with 'In' operator with enums where left operand is Invalid integral values

* Adding tests for errors thrown when using string literal that doesn't exists as enum member name

* Refactor to reuse methods and move logic that check if convert left node is required to private method

* Remove unnecessary ShouldConvertLeftOperand() method and put the logic inside BindInOperator()

* Make the new tests to only use generic methods introduced

* Resolve comments

* Reuse GetIEdmProperty() and GetIEdmType() methods in the other existing tests

* Merge related tests using [Theory]

* use string instead of object
@WanjohiSammy WanjohiSammy changed the title Cherry-pick (7d5c6c5): Fix for Error occurs when you check whether a string or integer literal is in an enum collection (#3023) Cherry-pick (7d5c6c5): Fix for Error occurs when you check whether a string or integer literal is in an enum collection Aug 16, 2024
@gathogojr gathogojr merged commit 393c548 into main Aug 16, 2024
5 checks passed
@gathogojr gathogojr deleted the fix/cherry-pick-7d5c6c5 branch August 16, 2024 14:17
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.

4 participants