-
Notifications
You must be signed in to change notification settings - Fork 2
[MS-1292] Refactor feature/login to use Kotlin Serialization instead of Jackson #1526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| package com.simprints.feature.login.screens.qrscanner | ||
|
|
||
| import androidx.annotation.Keep | ||
| import com.fasterxml.jackson.annotation.JsonProperty | ||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Keep | ||
| @Serializable | ||
| internal data class QrCodeContent( | ||
| val projectId: String, | ||
| val projectSecret: String, | ||
| @JsonProperty("backend") val apiBaseUrl: String? = null, | ||
| @SerialName("backend") val apiBaseUrl: String? = null, | ||
| ) |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,26 +2,19 @@ package com.simprints.feature.login.screens.form | |||||||||||||||||
|
|
||||||||||||||||||
| import androidx.arch.core.executor.testing.InstantTaskExecutorRule | ||||||||||||||||||
| import androidx.lifecycle.Observer | ||||||||||||||||||
| import com.google.common.truth.Truth.assertThat | ||||||||||||||||||
| import com.google.common.truth.Truth.* | ||||||||||||||||||
|
||||||||||||||||||
| import com.simprints.core.domain.tokenization.asTokenizableRaw | ||||||||||||||||||
| import com.simprints.core.tools.json.JsonHelper | ||||||||||||||||||
| import com.simprints.feature.login.LoginParams | ||||||||||||||||||
| import com.simprints.feature.login.screens.qrscanner.QrCodeContent | ||||||||||||||||||
| import com.simprints.feature.login.screens.qrscanner.QrScannerResult | ||||||||||||||||||
| import com.simprints.feature.login.screens.qrscanner.QrScannerResult.QrScannerError | ||||||||||||||||||
| import com.simprints.infra.authlogic.AuthManager | ||||||||||||||||||
| import com.simprints.infra.authlogic.model.AuthenticateDataResult | ||||||||||||||||||
| import com.simprints.infra.network.SimNetwork | ||||||||||||||||||
| import com.simprints.testtools.common.coroutines.TestCoroutineRule | ||||||||||||||||||
| import com.simprints.testtools.common.livedata.getOrAwaitValue | ||||||||||||||||||
| import io.mockk.MockKAnnotations | ||||||||||||||||||
| import io.mockk.clearMocks | ||||||||||||||||||
| import io.mockk.coEvery | ||||||||||||||||||
| import io.mockk.every | ||||||||||||||||||
| import io.mockk.* | ||||||||||||||||||
|
||||||||||||||||||
| import io.mockk.* | |
| import io.mockk.MockKAnnotations | |
| import io.mockk.clearMocks | |
| import io.mockk.coEvery | |
| import io.mockk.every | |
| import io.mockk.mockk | |
| import io.mockk.slot | |
| import io.mockk.verify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The blank lines between each branch of the when expression are unnecessary and inconsistent with typical Kotlin style conventions. Consider removing these extra blank lines to make the code more compact and readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look into disabling those rules.