Skip to content

Commit 54e9074

Browse files
Address review comments and updated test cases
1 parent 0d137b1 commit 54e9074

2 files changed

Lines changed: 26 additions & 26 deletions

File tree

src/main/kotlin/com/mparticle/kits/RoktKit.kt

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -383,28 +383,28 @@ class RoktKit :
383383
}
384384

385385
private fun getStringForIdentity(identityType: IdentityType): String = when (identityType) {
386-
IdentityType.Other -> "Other"
387-
IdentityType.CustomerId -> "CustomerId"
388-
IdentityType.Facebook -> "Facebook"
389-
IdentityType.Twitter -> "Twitter"
390-
IdentityType.Google -> "Google"
391-
IdentityType.Microsoft -> "Microsoft"
392-
IdentityType.Yahoo -> "Yahoo"
393-
IdentityType.Email -> "Email"
394-
IdentityType.Alias -> "Alias"
395-
IdentityType.FacebookCustomAudienceId -> "FacebookCustomAudienceId"
396-
IdentityType.Other2 -> "Other2"
397-
IdentityType.Other3 -> "Other3"
398-
IdentityType.Other4 -> "Other4"
399-
IdentityType.Other5 -> "Other5"
400-
IdentityType.Other6 -> "Other6"
401-
IdentityType.Other7 -> "Other7"
402-
IdentityType.Other8 -> "Other8"
403-
IdentityType.Other9 -> "Other9"
404-
IdentityType.Other10 -> "Other10"
405-
IdentityType.MobileNumber -> "MobileNumber"
406-
IdentityType.PhoneNumber2 -> "PhoneNumber2"
407-
IdentityType.PhoneNumber3 -> "PhoneNumber3"
386+
IdentityType.Other -> "other"
387+
IdentityType.CustomerId -> "customerid"
388+
IdentityType.Facebook -> "facebook"
389+
IdentityType.Twitter -> "twitter"
390+
IdentityType.Google -> "google"
391+
IdentityType.Microsoft -> "microsoft"
392+
IdentityType.Yahoo -> "yahoo"
393+
IdentityType.Email -> "email"
394+
IdentityType.Alias -> "alias"
395+
IdentityType.FacebookCustomAudienceId -> "facebookcustomaudienceid"
396+
IdentityType.Other2 -> "other2"
397+
IdentityType.Other3 -> "other3"
398+
IdentityType.Other4 -> "other4"
399+
IdentityType.Other5 -> "other5"
400+
IdentityType.Other6 -> "other6"
401+
IdentityType.Other7 -> "other7"
402+
IdentityType.Other8 -> "other8"
403+
IdentityType.Other9 -> "other9"
404+
IdentityType.Other10 -> "other10"
405+
IdentityType.MobileNumber -> "mobilenumber"
406+
IdentityType.PhoneNumber2 -> "phonenumber2"
407+
IdentityType.PhoneNumber3 -> "phonenumber3"
408408
else -> ""
409409
}
410410

src/test/kotlin/com/mparticle/kits/RoktKitTests.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class RoktKitTests {
300300
}
301301

302302
@Test
303-
fun test_addIdentityAttributes_When_userIdentities_UNASSIGNED_map_To_Identity() {
303+
fun test_addIdentityAttributes_When_userIdentities_Unknown_map_To_Identity() {
304304
val mockFilterUser = mock(FilteredMParticleUser::class.java)
305305
val userIdentities = HashMap<IdentityType, String>()
306306
userIdentities.put(IdentityType.Email, "TestEmail@gamil.com")
@@ -313,7 +313,7 @@ class RoktKitTests {
313313
)
314314
val hashedField = RoktKit::class.java.getDeclaredField("hashedEmailUserIdentityType")
315315
hashedField.isAccessible = true
316-
hashedField.set(roktKit, "UNASSIGNED")
316+
hashedField.set(roktKit, "Unknown")
317317
val method: Method = RoktKit::class.java.getDeclaredMethod(
318318
"addIdentityAttributes",
319319
Map::class.java,
@@ -326,8 +326,8 @@ class RoktKitTests {
326326
assertTrue(result.containsKey("key1"))
327327
assertTrue(result.containsKey("key2"))
328328
assertTrue(result.containsKey("key3"))
329-
assertTrue(result.containsKey("Email"))
330-
assertTrue(result.containsKey("Other"))
329+
assertTrue(result.containsKey("email"))
330+
assertTrue(result.containsKey("other"))
331331
}
332332

333333
@Test

0 commit comments

Comments
 (0)