/** * Creates a test {@link JSONObject} with all {@link UserAccount} fields populated * * @return {@link JSONObject} */ private JSONObject createTestAccountJSON() throws JSONException { JSONObject object = new JSONObject(); object.put(UserAccount.AUTH_TOKEN, TEST_AUTH_TOKEN); object.put(UserAccount.REFRESH_TOKEN, TEST_REFRESH_TOKEN); object.put(UserAccount.LOGIN_SERVER, TEST_LOGIN_URL); object.put(UserAccount.ID_URL, TEST_IDENTITY_URL); object.put(UserAccount.INSTANCE_SERVER, TEST_INSTANCE_URL); object.put(UserAccount.ORG_ID, TEST_ORG_ID); object.put(UserAccount.USER_ID, TEST_USER_ID); object.put(UserAccount.USERNAME, TEST_USERNAME); object.put(UserAccount.CLIENT_ID, TEST_CLIENT_ID); object.put(UserAccount.ACCOUNT_NAME, TEST_ACCOUNT_NAME); object.put(UserAccount.COMMUNITY_ID, TEST_COMMUNITY_ID); object.put(UserAccount.COMMUNITY_URL, TEST_COMMUNITY_URL); object.put(UserAccount.FIRST_NAME, TEST_FIRST_NAME); object.put(UserAccount.LAST_NAME, TEST_LAST_NAME); object.put(UserAccount.DISPLAY_NAME, TEST_DISPLAY_NAME); object.put(UserAccount.EMAIL, TEST_EMAIL); object.put(UserAccount.PHOTO_URL, TEST_PHOTO_URL); object.put(UserAccount.THUMBNAIL_URL, TEST_THUMBNAIL_URL); object = MapUtil.addMapToJSONObject( createAdditionalOauthValues(), createAdditionalOauthKeys(), object); return object; }
/** * Creates a test {@link Bundle} with all {@link UserAccount} fields populated * * @return {@link Bundle} */ private Bundle createTestAccountBundle() { Bundle object = new Bundle(); object.putString(UserAccount.AUTH_TOKEN, TEST_AUTH_TOKEN); object.putString(UserAccount.REFRESH_TOKEN, TEST_REFRESH_TOKEN); object.putString(UserAccount.LOGIN_SERVER, TEST_LOGIN_URL); object.putString(UserAccount.ID_URL, TEST_IDENTITY_URL); object.putString(UserAccount.INSTANCE_SERVER, TEST_INSTANCE_URL); object.putString(UserAccount.ORG_ID, TEST_ORG_ID); object.putString(UserAccount.USER_ID, TEST_USER_ID); object.putString(UserAccount.USERNAME, TEST_USERNAME); object.putString(UserAccount.CLIENT_ID, TEST_CLIENT_ID); object.putString(UserAccount.ACCOUNT_NAME, TEST_ACCOUNT_NAME); object.putString(UserAccount.COMMUNITY_ID, TEST_COMMUNITY_ID); object.putString(UserAccount.COMMUNITY_URL, TEST_COMMUNITY_URL); object.putString(UserAccount.FIRST_NAME, TEST_FIRST_NAME); object.putString(UserAccount.LAST_NAME, TEST_LAST_NAME); object.putString(UserAccount.DISPLAY_NAME, TEST_DISPLAY_NAME); object.putString(UserAccount.EMAIL, TEST_EMAIL); object.putString(UserAccount.PHOTO_URL, TEST_PHOTO_URL); object.putString(UserAccount.THUMBNAIL_URL, TEST_THUMBNAIL_URL); object = MapUtil.addMapToBundle(createAdditionalOauthValues(), createAdditionalOauthKeys(), object); return object; }