Skip to content

Commit

Permalink
Update DeviceType phone->mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
ziad-halabi9 committed Oct 9, 2024
1 parent fda2632 commit f8d1721
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ data class Client(
@SerializedName("tablet")
TABLET,

@SerializedName("phone")
PHONE,
@SerializedName("mobile")
MOBILE,

;

Expand All @@ -43,7 +43,7 @@ data class Client(
uiModeManager.currentModeType == Configuration.UI_MODE_TYPE_TELEVISION -> TV
uiModeManager.currentModeType == Configuration.UI_MODE_TYPE_CAR -> ANDROID_AUTO
context.resources.getBoolean(R.bool.is_tablet) -> TABLET
else -> PHONE
else -> MOBILE
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class ClientSupplierTest {
}

@Test
fun invokeWhenPhone() = runBlocking {
fun invokeWhenMobile() = runBlocking {
val resources = mock<Resources> {
on { getBoolean(R.bool.is_tablet) } doReturn false
}
Expand Down Expand Up @@ -188,7 +188,7 @@ class ClientSupplierTest {
val actualClient = clientSupplier.invoke()

assertThat(actualClient.reflectionToken).isSameAs(clientIdString)
assertThat(actualClient.reflectionDeviceType).isEqualTo(Client.DeviceType.PHONE)
assertThat(actualClient.reflectionDeviceType).isEqualTo(Client.DeviceType.MOBILE)
assertThat(actualClient.reflectionVersion).isSameAs(version)
verify(credentialsProvider).getCredentials()
verify(authResult).successData
Expand All @@ -202,7 +202,7 @@ class ClientSupplierTest {
}

@Test
fun invokeWhenPhoneWithEmptyToken() = runBlocking {
fun invokeWhenMobileWithEmptyToken() = runBlocking {
val resources = mock<Resources> {
on { getBoolean(R.bool.is_tablet) } doReturn false
}
Expand All @@ -222,7 +222,7 @@ class ClientSupplierTest {
val actualClient = clientSupplier.invoke()

assertThat(actualClient.reflectionToken).isSameAs("")
assertThat(actualClient.reflectionDeviceType).isEqualTo(Client.DeviceType.PHONE)
assertThat(actualClient.reflectionDeviceType).isEqualTo(Client.DeviceType.MOBILE)
assertThat(actualClient.reflectionVersion).isSameAs(version)
verify(credentialsProvider).getCredentials()
verify(authResult).successData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal class ClientMarshallingTest {
Client.DeviceType.ANDROID_AUTO -> "androidAuto"
Client.DeviceType.TV -> "tv"
Client.DeviceType.TABLET -> "tablet"
Client.DeviceType.PHONE -> "phone"
Client.DeviceType.MOBILE -> "mobile"
}
val version = "a version"
val src = Client(token, deviceType, version)
Expand Down

0 comments on commit f8d1721

Please sign in to comment.