-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #192 from Countly/move_functions
feat: move convenient functions to utils
- Loading branch information
Showing
5 changed files
with
118 additions
and
118 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -45,7 +45,7 @@ public void setUserBasics() { | |
|
||
Countly.instance().userProfile().save(); | ||
|
||
UserEditorTests.validateUserDetailsRequestInRQ(UserEditorTests.map("user_details", UserEditorTests.json( | ||
UserEditorTests.validateUserDetailsRequestInRQ(TestUtils.map("user_details", TestUtils.json( | ||
"name", "Test", | ||
"username", "TestUsername", | ||
"email", "[email protected]", | ||
|
@@ -77,10 +77,10 @@ public void clear() { | |
Countly.instance().userProfile().clear(); | ||
Countly.instance().userProfile().save(); | ||
|
||
UserEditorTests.validateUserDetailsRequestInRQ(UserEditorTests.map("user_details", UserEditorTests.json( | ||
UserEditorTests.validateUserDetailsRequestInRQ(TestUtils.map("user_details", TestUtils.json( | ||
"name", "Test", | ||
"username", "TestUsername", | ||
"custom", UserEditorTests.map("level", 56) | ||
"custom", TestUtils.map("level", 56) | ||
))); | ||
} | ||
|
||
|
@@ -95,7 +95,7 @@ public void setProperties_empty_null() { | |
Countly.instance().userProfile().setProperties(null); | ||
Countly.instance().userProfile().setProperties(new ConcurrentHashMap<>()); | ||
Countly.instance().userProfile().save(); | ||
UserEditorTests.validateUserDetailsRequestInRQ(UserEditorTests.map()); | ||
UserEditorTests.validateUserDetailsRequestInRQ(TestUtils.map()); | ||
} | ||
|
||
/** | ||
|
@@ -109,7 +109,7 @@ public void increment() { | |
Countly.instance().userProfile().increment("test"); | ||
Countly.instance().userProfile().incrementBy("test", 2); | ||
Countly.instance().userProfile().save(); | ||
UserEditorTests.validateUserDetailsRequestInRQ(UserEditorTests.map("user_details", | ||
UserEditorTests.validateUserDetailsRequestInRQ(TestUtils.map("user_details", | ||
UserEditorTests.c(UserEditorTests.opJson("test", "$inc", 3)) | ||
)); | ||
} | ||
|
@@ -128,7 +128,7 @@ public void saveMax_Min() { | |
Countly.instance().userProfile().saveMin(TestUtils.eKeys[1], 2); | ||
Countly.instance().userProfile().saveMin(TestUtils.eKeys[1], 0.002); | ||
Countly.instance().userProfile().save(); | ||
UserEditorTests.validateUserDetailsRequestInRQ(UserEditorTests.map("user_details", UserEditorTests.c( | ||
UserEditorTests.validateUserDetailsRequestInRQ(TestUtils.map("user_details", UserEditorTests.c( | ||
UserEditorTests.opJson(TestUtils.eKeys[1], "$min", 0.002), | ||
UserEditorTests.opJson(TestUtils.eKeys[0], "$max", 9.62) | ||
))); | ||
|
@@ -144,7 +144,7 @@ public void multiply() { | |
Countly.instance().init(TestUtils.getBaseConfig()); | ||
Countly.instance().userProfile().multiply("test", 2); | ||
Countly.instance().userProfile().save(); | ||
UserEditorTests.validateUserDetailsRequestInRQ(UserEditorTests.map("user_details", | ||
UserEditorTests.validateUserDetailsRequestInRQ(TestUtils.map("user_details", | ||
UserEditorTests.c(UserEditorTests.opJson("test", "$mul", 2)) | ||
)); | ||
} | ||
|
@@ -193,7 +193,7 @@ public void pullPush_base(String op, BiConsumer<String, Object> opFunction) { | |
|
||
Countly.instance().userProfile().save(); | ||
|
||
UserEditorTests.validateUserDetailsRequestInRQ(UserEditorTests.map("user_details", UserEditorTests.c( | ||
UserEditorTests.validateUserDetailsRequestInRQ(TestUtils.map("user_details", UserEditorTests.c( | ||
UserEditorTests.opJson(TestUtils.eKeys[3], op, TestUtils.eKeys[2]), | ||
UserEditorTests.opJson(TestUtils.eKeys[0], op, TestUtils.eKeys[1], TestUtils.eKeys[2], 89, TestUtils.eKeys[2], "") | ||
) | ||
|
@@ -211,7 +211,7 @@ public void setOnce() { | |
Countly.instance().userProfile().setOnce(TestUtils.eKeys[0], 56); | ||
Countly.instance().userProfile().setOnce(TestUtils.eKeys[0], TestUtils.eKeys[1]); | ||
Countly.instance().userProfile().save(); | ||
UserEditorTests.validateUserDetailsRequestInRQ(UserEditorTests.map("user_details", UserEditorTests.c( | ||
UserEditorTests.validateUserDetailsRequestInRQ(TestUtils.map("user_details", UserEditorTests.c( | ||
UserEditorTests.opJson(TestUtils.eKeys[0], "$setOnce", TestUtils.eKeys[1])))); | ||
} | ||
} |
This file contains 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 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.