@@ -216,12 +216,12 @@ public void run() {
216216
217217 @ Test
218218 public void testSetUserAttribute () throws Exception {
219- final String key = mRandomUtils .getAlphaNumericString (25 );
220- final String value = mRandomUtils .getAlphaNumericString (25 );
219+ final String key = mRandomUtils .getAlphaNumericString (25 );
220+ final String value = mRandomUtils .getAlphaNumericString (25 );
221221 String testJavascript = String .format ("mParticle.Identity.getCurrentUser().setUserAttribute(\" %s\" , \" %s\" );\n " , key , value );
222222 final MutableBoolean called = new MutableBoolean (false );
223223 final CountDownLatch latch = new MPLatch (1 );
224- runJavascriptTest (testJavascript , new MParticleJSInterface (){
224+ runJavascriptTest (testJavascript , new MParticleJSInterface () {
225225 @ Override
226226 @ JavascriptInterface
227227 public void setUserAttribute (String json ) {
@@ -232,8 +232,7 @@ public void setUserAttribute(String json) {
232232 assertEquals (value , jsonObject .getString ("value" ));
233233 called .value = true ;
234234 latch .countDown ();
235- }
236- catch (JSONException jse ) {
235+ } catch (JSONException jse ) {
237236 jse .printStackTrace ();
238237 }
239238
@@ -249,7 +248,7 @@ public void testRemoveUserAttribute() throws Exception {
249248 String testJavascript = String .format ("mParticle.Identity.getCurrentUser().removeUserAttribute(\" %s\" );\n " , key );
250249 final MutableBoolean called = new MutableBoolean (false );
251250 final CountDownLatch latch = new MPLatch (1 );
252- runJavascriptTest (testJavascript , new MParticleJSInterface (){
251+ runJavascriptTest (testJavascript , new MParticleJSInterface () {
253252 @ Override
254253 @ JavascriptInterface
255254 public void removeUserAttribute (String json ) {
@@ -259,8 +258,7 @@ public void removeUserAttribute(String json) {
259258 assertEquals (key , jsonObject .getString ("key" ));
260259 called .value = true ;
261260 latch .countDown ();
262- }
263- catch (JSONException jse ) {
261+ } catch (JSONException jse ) {
264262 jse .printStackTrace ();
265263 }
266264 }
@@ -276,7 +274,7 @@ public void testSetUserTag() throws Exception {
276274 final MutableBoolean called = new MutableBoolean (false );
277275 final CountDownLatch latch = new MPLatch (1 );
278276 //This is acceptable if the JS SDK calls either setUserTag, or setUserAttribute with a null value
279- runJavascriptTest (testJavascript , new MParticleJSInterface (){
277+ runJavascriptTest (testJavascript , new MParticleJSInterface () {
280278 @ Override
281279 @ JavascriptInterface
282280 public void setUserTag (String json ) {
@@ -286,8 +284,7 @@ public void setUserTag(String json) {
286284 assertEquals (tag , jsonObject .getString ("key" ));
287285 called .value = true ;
288286 latch .countDown ();
289- }
290- catch (JSONException jse ) {
287+ } catch (JSONException jse ) {
291288 jse .printStackTrace ();
292289 }
293290 }
@@ -302,8 +299,7 @@ public void setUserAttribute(String json) {
302299 assertEquals (jsonObject .optString ("value" , "null" ), "null" );
303300 called .value = true ;
304301 latch .countDown ();
305- }
306- catch (JSONException jse ) {
302+ } catch (JSONException jse ) {
307303 jse .printStackTrace ();
308304 }
309305 }
@@ -314,7 +310,7 @@ public void setUserAttribute(String json) {
314310
315311 @ Test
316312 public void testLogEvent () throws Exception {
317- final JSONObject customAttributes = MPUtility .mapToJson ( mRandomUtils .getRandomAttributes (10 ));
313+ final JSONObject customAttributes = MPUtility .mapToJson (mRandomUtils .getRandomAttributes (10 ));
318314 final JSONObject customFlagsJSON = MPUtility .mapToJson (getCustomFlags ());
319315 String testJavascript = String .format ("mParticle.logEvent('Play Movie Tapped',\n " +
320316 " mParticle.EventType.Navigation,\n " +
@@ -371,7 +367,7 @@ public void logEvent(String json) {
371367
372368 @ Test
373369 public void testLogCommerceEvent () throws Exception {
374- final JSONObject customAttributes = MPUtility .mapToJson ( mRandomUtils .getRandomAttributes (10 ));
370+ final JSONObject customAttributes = MPUtility .mapToJson (mRandomUtils .getRandomAttributes (10 ));
375371 final JSONObject customFlags = MPUtility .mapToJson (getCustomFlags ());
376372 String testJavascript = String .format ("// 1. Create the product\n " +
377373 "var product = mParticle.eCommerce.createProduct(\n " +
@@ -454,7 +450,7 @@ public void logEvent(String json) {
454450
455451 @ Test
456452 public void testLogout () throws Exception {
457- final Map <MParticle .IdentityType , String > userIdentityMap = mRandomUtils .getRandomUserIdentities ();
453+ final Map <MParticle .IdentityType , String > userIdentityMap = mRandomUtils .getRandomUserIdentities ();
458454 JSONObject jsonObject = userIdentityMapToJson (userIdentityMap );
459455 String testJavascript = String .format ("mParticle.Identity.logout(%s , null);" , jsonObject .toString (4 ));
460456
@@ -506,7 +502,7 @@ public void logout() {
506502
507503 @ Test
508504 public void testLogin () throws Exception {
509- final Map <MParticle .IdentityType , String > userIdentityMap = mRandomUtils .getRandomUserIdentities ();
505+ final Map <MParticle .IdentityType , String > userIdentityMap = mRandomUtils .getRandomUserIdentities ();
510506 JSONObject jsonObject = userIdentityMapToJson (userIdentityMap );
511507 String testJavascript = String .format ("mParticle.Identity.login(%s , null);" , jsonObject .toString (4 ));
512508
@@ -558,7 +554,7 @@ public void login() {
558554
559555 @ Test
560556 public void testModify () throws Exception {
561- final Map <MParticle .IdentityType , String > userIdentities = mRandomUtils .getRandomUserIdentities ();
557+ final Map <MParticle .IdentityType , String > userIdentities = mRandomUtils .getRandomUserIdentities ();
562558 JSONObject jsonObject = userIdentityMapToJson (userIdentities );
563559 String testJavascript = String .format ("mParticle.Identity.modify(%s , null);" , jsonObject .toString (4 ));
564560
0 commit comments