- Notifications
You must be signed in to change notification settings - Fork 32
feature: add OptimizelyJSON #371
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
26 commits Select commit Hold shift + click to select a range
032c270 add OptimizelyJSON
jaeopt 99014d2 clean up
jaeopt 9de2535 add doc comments
jaeopt 641d215 Merge branch 'master' into jae/optimizely-json
jaeopt 69144a0 add more tests
jaeopt f319fdc fix test
jaeopt 096bcb9 (wip) add multiple parser support to OptimizelyJSON
jaeopt 5be5f3f split getvalue tests
jaeopt 01970f5 disable getValue for legacy parsers
jaeopt 2401784 add legacy parser tests
jaeopt afdb8be fix tests for all parsers
jaeopt 2952834 Merge branch 'master' into jae/optimizely-json
jaeopt 24ed0d6 cleanup
jaeopt 5d45085 fix findbugs issues
jaeopt 2af6f14 cleanup
jaeopt b5db429 fix test per review
jaeopt b6fc66c fix JsonSimple parser
jaeopt ef7963b add unit tests for all parsers
jaeopt 880111b add unit tests for JsonHelpers
jaeopt 14ace05 fix test types
jaeopt f0df4e2 refact json parser tests
jaeopt ceddf49 cleanup parser tests
jaeopt 37efc58 cleanup
jaeopt 8cd3b55 change to parameterized tests
jaeopt c92459f fix merge conflict
jaeopt e5d792a fix getValue destroy test
jaeopt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix JsonSimple parser
- Loading branch information
commit b6fc66c370e19e182fc430174fc45a733df08e6e
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -18,7 +18,7 @@ | |
| | ||
| import com.optimizely.ab.config.parser.ConfigParser; | ||
| import com.optimizely.ab.config.parser.GsonConfigParser; | ||
| import com.optimizely.ab.config.parser.UnsupportedOperationException; | ||
| import com.optimizely.ab.config.parser.JsonParseException; | ||
| import com.optimizely.ab.optimizelyjson.types.MDN1; | ||
| import com.optimizely.ab.optimizelyjson.types.NotMatchingType; | ||
| import org.junit.Test; | ||
| | @@ -38,7 +38,7 @@ protected ConfigParser getParser() { | |
| // Tests for GSON only | ||
| ||
| | ||
| @Test | ||
| public void testGetValueWithNotMatchingType() throws UnsupportedOperationException { | ||
| public void testGetValueWithNotMatchingType() throws JsonParseException { | ||
| OptimizelyJSON oj1 = new OptimizelyJSON(orgJson, getParser()); | ||
| | ||
| NotMatchingType md = oj1.getValue(null, NotMatchingType.class); | ||
| | @@ -48,7 +48,7 @@ public void testGetValueWithNotMatchingType() throws UnsupportedOperationExcepti | |
| // Tests for integer/double processing | ||
| | ||
| @Test | ||
| public void testIntegerProcessing() throws UnsupportedOperationException { | ||
| public void testIntegerProcessing() throws JsonParseException { | ||
| | ||
| // GSON parser toMap() adds ".0" to all integers | ||
| | ||
| | @@ -68,7 +68,7 @@ public void testIntegerProcessing() throws UnsupportedOperationException { | |
| } | ||
| | ||
| @Test | ||
| public void testIntegerProcessing2() throws UnsupportedOperationException { | ||
| public void testIntegerProcessing2() throws JsonParseException { | ||
| | ||
| // GSON parser toString() keeps ".0" in double | ||
| | ||
| | @@ -88,7 +88,7 @@ public void testIntegerProcessing2() throws UnsupportedOperationException { | |
| } | ||
| | ||
| @Test | ||
| public void testIntegerProcessing3() throws UnsupportedOperationException { | ||
| public void testIntegerProcessing3() throws JsonParseException { | ||
| String json = "{\"k1\":1,\"k2\":2.5,\"k3\":{\"kk1\":3,\"kk2\":4.0}}"; | ||
| | ||
| OptimizelyJSON oj1 = new OptimizelyJSON(json, getParser()); | ||
| | ||
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
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
Oops, something went wrong.
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.
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.
Instead of Core vs Extended you can use assumeThat to conditionally ignore a parameterized variant.