Skip to content

Commit

Permalink
Merge branch 'staging' into new_location_module
Browse files Browse the repository at this point in the history
  • Loading branch information
arifBurakDemiray authored Nov 21, 2023
2 parents 1a6a2ea + 7a05f5f commit 30aadb4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,12 @@ private void performCustomUpdate(final String key, final Object value, final JSO
* @return a String user_details url part with provided user data
*/
private Params prepareRequestParamsForUserProfile() {

if (isSynced) {
L.d("[ModuleUserProfile] prepareRequestParamsForUserProfile, nothing to save returning");
return new Params();
}

isSynced = true;
Params params = new Params();
final JSONObject json = new JSONObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import ly.count.sdk.java.User;
import ly.count.sdk.java.UserEditor;
import org.json.JSONException;
import org.json.JSONObject;

public class UserEditorImpl implements UserEditor {
private final Log L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void setOnce_empty() {
* Validating that all the methods are working properly
* Request should contain all the parameters directly also in "user_details" json and body
*/
@Test
// @Test //todo this test will be needed rework with location module
public void setLocationBasics() {
Countly.instance().init(TestUtils.getBaseConfig().setFeatures(Config.Feature.Location));
sessionHandler(() -> Countly.instance().user().edit()
Expand All @@ -194,7 +194,7 @@ public void setLocationBasics() {
* Validating that all the methods are working properly
* Request should contain all the parameters directly also in "user_details" json and body
*/
@Test
// @Test //todo this test will be needed rework with location module
public void setLocationBasics_null() {
Countly.instance().init(TestUtils.getBaseConfig().setFeatures(Config.Feature.Location));
sessionHandler(() -> Countly.instance().user().edit()
Expand Down Expand Up @@ -544,7 +544,7 @@ private void setGender_base(Object gender, Map<String, Object> expectedValues) {
* Validating that values is correctly parsed to the long and added to the request,
* Request should contain "location" parameter in "user_details" json and "location" parameter in the request
*/
@Test
// @Test //todo this test will be needed rework with location module
public void setLocation_fromString() {
Countly.instance().init(TestUtils.getBaseConfig().setFeatures(Config.Feature.Location));
sessionHandler(() -> Countly.instance().user().edit().setLocation("-40.7128, 74.0060").commit());
Expand All @@ -556,7 +556,7 @@ public void setLocation_fromString() {
* Validating that values is correctly parsed to the long and added to the request,
* Request should contain "location" parameter in "user_details" json and "location" parameter in the request
*/
@Test
// @Test //todo this test will be needed rework with location module
public void setLocation_fromString_noConsent() {
Countly.instance().init(TestUtils.getBaseConfig());
sessionHandler(() -> Countly.instance().user().edit().setLocation("32.78, 28.01").commit());
Expand Down Expand Up @@ -592,7 +592,7 @@ public void setLocation_fromString_onePair() {
* Validating that location is nullified
* Request should contain "location" parameter in "user_details" json and request body and should be null
*/
@Test //todo this test will be needed rework with location module
@Test
public void setLocation_fromString_null() {
Countly.instance().init(TestUtils.getBaseConfig().setFeatures(Config.Feature.Location));
sessionHandler(() -> Countly.instance().user().edit().setLocation(null).commit());
Expand All @@ -604,7 +604,7 @@ public void setLocation_fromString_null() {
* Validating that calling the function will result in nullifying the location relates params
* Request should contain "location","country_code","city" parameters in the body and should be null
*/
@Test //todo this test will be needed rework with location module
@Test
public void optOutFromLocationServices() {
Countly.instance().init(TestUtils.getBaseConfig().setFeatures(Config.Feature.Location));
sessionHandler(() -> Countly.instance().user().edit().optOutFromLocationServices().commit());
Expand Down Expand Up @@ -645,7 +645,7 @@ public void set_notAString() {
* Set various kind of user properties and validate that they are added to the request
* There should be 2 request, and it should be a session begin and end. End request should contain all the properties
*/
@Test
// @Test //todo this test will be needed rework with location module
public void set_multipleCalls_sessionsEnabled() {
Countly.instance().init(TestUtils.getBaseConfig().setFeatures(Config.Feature.Sessions, Config.Feature.Location).setUpdateSessionTimerDelay(1));
sessionHandler(() -> Countly.instance().user().edit()
Expand Down

0 comments on commit 30aadb4

Please sign in to comment.