-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: Added GetFeatureVariableJSON. #216
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.
please address.
# Conflicts: # OptimizelySDK.Tests/OptimizelyJsonTest.cs
@@ -1624,7 +1704,7 @@ public void TestUnsupportedVariableType() | |||
Assert.IsNull(featureVariableStringRandomType); | |||
|
|||
var featureVariableStringJsonType = Optimizely.GetFeatureVariableString("unsupported_variabletype", "string_json_key", TestUserId); | |||
Assert.AreEqual(featureVariableStringJsonType, "{\"myvalue\": \"jsonValue\"}"); | |||
Assert.IsNull(featureVariableStringJsonType); |
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.
Why value is changed to IsNULL
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.
because the subtype of that variable is json and we are changing type from string to json upon initialization. so it will not match and will return null as type of variable will not match
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.
requested some changes. otherwise looks good.
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
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.
are there any tests with notification listener ?
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 - Good work
@@ -589,6 +593,13 @@ | |||
"key": "string_variable", | |||
"type": "string", | |||
"defaultValue": "wingardium leviosa" | |||
}, |
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.
since C# had a problem before with json type, please add
{
"defaultValue": "{\"int_var\": 5212, \"boolean_key\": true}",
"type": "json",
"id": "1",
"key": "true_json_var"
}
and test
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.
Added the test you asked for. So can you please review if this is what you asked for? link
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, ok to merge after one more test I asked
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
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