-
Notifications
You must be signed in to change notification settings - Fork 20
move validate forced decision to decision service #292
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 statemen 8000 t. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/// <param name="context">Object containing flag and rule key of which forced decision is set.</param> | ||
/// <param name="flagDecision">Object containing forced decision based on the provided context.</param> | ||
/// <param name="config">The Project config.</param> | ||
/// <returns>A result with the variation</returns> |
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.
Need to revise parameters.
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.
Overall it looks good! A couple of suggestions you can consider.
/// <param name="flagDecision">Object containing forced decision based on the provided context.</param> | ||
/// <param name="config">The Project config.</param> | ||
/// <returns>A result with the variation</returns> | ||
public Result<Variation> ValidatedForcedDecision(OptimizelyDecisionContext context, OptimizelyForcedDecision forcedDecision, ProjectConfig config, string userId) |
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 about passing userContext. This can be simpler and extensible with usercontext?
public Result<Variation> ValidatedForcedDecision(OptimizelyDecisionContext context, OptimizelyForcedDecision forcedDecision, ProjectConfig config, string userId) | |
public Result<Variation> ValidatedForcedDecision(OptimizelyDecisionContext context, OptimizelyUserContext user, ProjectConfig config) |
@@ -289,16 +289,18 @@ public void TestGetForcedDecisionReturnsValueWithRuleKey() | |||
[Test] | |||
public void TestFindValidatedForcedDecisionReturnsCorrectDecisionWithNullVariation() | |||
{ | |||
var decisionReasons = new DecisionReasons(); |
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.
I believe this test will be moved to DecisionService.
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.
Seems good. All of Jae's changes I agree with.
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
All unit test and FSC tests should pass.