-
Notifications
You must be signed in to change notification settings - Fork 20
feat(api): Decision Notification Listener for IsFeatureEnabled and GetEnabledFeatures APIs. #149
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
Conversation
…ener-feature-enabled
…ener-feature-enabled # Conflicts: # OptimizelySDK.Tests/ProjectConfigTest.cs # OptimizelySDK.Tests/TestData.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor feedback. Looks good otherwise.
OptimizelySDK/Optimizely.cs
Outdated
@@ -645,5 +669,10 @@ private bool ValidateStringInputs(Dictionary<string, string> inputs) | |||
|
|||
return isValid; | |||
} | |||
|
|||
private bool IsValidDecision(FeatureDecision decision) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this validity check about? Also, I feel it belongs on the FeatureDecision
class and not like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps call it IsExperimentDecision
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check validates decision object. But I misunderstood that DecisionService.GetVariationForFeature() can return null.
I removed this function as the above method can't return null and checking decision.Variation is enough for validating decision object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Test plan