Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gpanshu committed Nov 30, 2022
1 parent 58aef46 commit 86989c0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
Expand Up @@ -138,16 +138,16 @@ import com.amplifyframework.statemachine.codegen.states.SRPSignInState
import com.amplifyframework.statemachine.codegen.states.SignInChallengeState
import com.amplifyframework.statemachine.codegen.states.SignInState
import com.amplifyframework.statemachine.codegen.states.SignOutState
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.async
import kotlinx.coroutines.launch
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicReference
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.async
import kotlinx.coroutines.launch

internal class RealAWSCognitoAuthPlugin(
private val configuration: AuthConfiguration,
Expand Down
Expand Up @@ -106,7 +106,7 @@ object SignUpTestCaseGenerator : SerializableProvider {

val signupSuccessCase = baseCase.copy(
description = "Sign up finishes if user is confirmed in the first step",
preConditions = baseCase.preConditions.copy (
preConditions = baseCase.preConditions.copy(
mockedResponses = listOf(
MockResponse(
CognitoType.CognitoIdentityProvider,
Expand All @@ -131,15 +131,15 @@ object SignUpTestCaseGenerator : SerializableProvider {
apiName = AuthAPI.signUp,
responseType = ResponseType.Success,
response =
AuthSignUpResult(
true,
AuthNextSignUpStep(
AuthSignUpStep.DONE,
emptyMap(),
AuthSignUpResult(
true,
AuthNextSignUpStep(
AuthSignUpStep.DONE,
emptyMap(),
null
),
null
),
null
).toJsonElement()
).toJsonElement()
)
)
)
Expand Down
Expand Up @@ -68,7 +68,9 @@ class CognitoMockFactory(
setupError(mockResponse, responseObject)
SignUpResponse.invoke {
this.codeDeliveryDetails = parseCodeDeliveryDetails(responseObject)
this.userConfirmed = if(responseObject.containsKey("userConfirmed")){(responseObject["userConfirmed"] as JsonPrimitive).boolean} else false
this.userConfirmed = if (responseObject.containsKey("userConfirmed")) {
(responseObject["userConfirmed"] as? JsonPrimitive)?.boolean ?: false
} else false
}
}
}
Expand Down

0 comments on commit 86989c0

Please sign in to comment.