Refactor the string predicate search strategy logic#7
Merged
Conversation
- Adds unit tests for each strategy - Adds throw capability when invalid strategy evaluates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request aims to improve the StringContainsOperators library by adding several enhancements that will make it easier to use and maintain. The following changes have been made:
Input Kind of each predicate
Added an input kind for each predicate, which helps to simplify the implementation of strategies by allowing them to take in and output only one kind of data. This change will also make it easier to write unit tests for each strategy.
Simplified the implementation of Strategies
We have simplified the implementation of strategies, making it easier to maintain and update them in the future. This change also improves the readability of the code.
Added Unit Tests for each strategy
To ensure that each strategy works as expected, we have added unit tests for each strategy. These tests cover both positive and negative scenarios, ensuring that each strategy behaves as expected in all cases.
Added throw capability when invalid strategy evaluates
We have added a throw capability when an invalid strategy is evaluated. This change ensures that the library is more robust and that errors are caught early, improving overall stability and reliability.