-
Notifications
You must be signed in to change notification settings - Fork 20
Feat: Added unit test to verify in which SendFlagDecision is true and false #258
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
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.
Tests look good.
Suggested to add the same tests for featureTest as well.
var featureKey = "boolean_single_variable_feature"; | ||
var featureFlag = Config.GetFeatureFlagFromKey(featureKey); | ||
var variables = Optimizely.GetAllFeatureVariables(featureKey, TestUserId); | ||
var reasons = new OptimizelyDecideOption[0]; |
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.
Remove this line
var featureKey = "boolean_single_variable_feature"; | ||
var featureFlag = Config.GetFeatureFlagFromKey(featureKey); | ||
var variables = Optimizely.GetAllFeatureVariables(featureKey, TestUserId); | ||
var reasons = new OptimizelyDecideOption[0]; |
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.
Remove
{ "ruleKey", ruleKey }, | ||
{ "reasons", reasons }, | ||
{ "decisionEventDispatched", false } | ||
}))), Times.Once); |
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.
Can you validation that event is actually not sent out?
{ "reasons", reasons }, | ||
{ "decisionEventDispatched", true } | ||
}))), Times.Once); | ||
} |
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.
Can you validation that event is actually sent out and event contents as well?
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.
Also, can we add the same couple of tests for "featureTest" (not rollout) as well?
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