This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.filipelipan.composebuss | |
import android.os.Bundle | |
import androidx.activity.ComponentActivity | |
import androidx.activity.compose.setContent | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.* | |
import androidx.compose.material.MaterialTheme | |
import androidx.compose.material.Surface | |
import androidx.compose.material.Text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestSchedulerRule : TestRule { | |
val testScheduler = TestScheduler() | |
@Suppress("UNUSED_ANONYMOUS_PARAMETER") | |
override fun apply(base: Statement, d: Description): Statement { | |
return object : Statement() { | |
@Throws(Throwable::class) | |
override fun evaluate() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
viewModelScope.launch { | |
runWithExecutor( | |
asyncFunction = async { getSupportedCountriesUseCase.execute(UseCase.None()) }, | |
contextExecutor = coroutinesDispatcherProvider.io) { | |
it.fold(::showError, ::showCountries) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class UseCase<out Type, in Params> where Type : Any { | |
abstract suspend fun executeOperation(params: Params): Either<Failure, Type> | |
suspend operator fun invoke(scope: CoroutineScope, params: Params, onResult: (Either<Failure, Type>) -> Unit = {}) = scope.launch { | |
val job = executeOperation(params) | |
withContext(Dispatchers.Main) { | |
onResult(job) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class UseCase<out Type, in Params> where Type : Any? { | |
abstract suspend fun run(params: Params): Either<Failure, Type> | |
suspend operator fun invoke(params: Params, coroutinesDispatcherProvider: CoroutinesDispatcherProvider, onResult: (Either<Failure, Type>) -> Unit = {}) { | |
val result = run(params) | |
withContext(coroutinesDispatcherProvider.main) { | |
onResult(result) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ebanx.go.app.feature_signup | |
import androidx.arch.core.executor.testing.InstantTaskExecutorRule | |
import com.ebanx.go.app.shared_kotlin.functional.Either | |
import com.ebanx.go.domain.interactor.GetSupportedCountriesUseCase | |
import com.ebanx.go.domain.model.Country | |
import com.nhaarman.mockitokotlin2.any | |
import com.nhaarman.mockitokotlin2.given | |
import junit.framework.Assert.assertEquals | |
import kotlinx.coroutines.Dispatchers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
network details | |
Proxy manual | |
Help - ssl proxying - device proxying | |
Install Charles proxy | |
Copiar ip e portas | |
Para o emulador - proxy manual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ebanx.congo.app | |
import android.content.Context | |
import android.security.KeyPairGeneratorSpec | |
import android.security.keystore.KeyGenParameterSpec | |
import android.security.keystore.KeyProperties | |
import android.security.keystore.KeyProperties.KEY_ALGORITHM_RSA | |
import android.util.Base64 | |
import androidx.security.crypto.MasterKeys | |
import com.ebanx.congo.BuildConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.botpag.ui.payment | |
import android.Manifest | |
import android.content.Intent | |
import android.content.pm.PackageManager | |
import androidx.core.app.ActivityCompat | |
import androidx.core.content.ContextCompat | |
import androidx.fragment.app.FragmentActivity | |
import androidx.lifecycle.Lifecycle | |
import androidx.lifecycle.LifecycleObserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.avon.common.repository.remote.util; | |
import java.io.IOException; | |
import javax.annotation.Nullable; | |
import br.com.avon.common.BuildConfig; | |
import br.com.avon.common.entity.response.mobile_commerce.RenewTokenResponse; | |
import br.com.avon.common.infrastructure.MyApplication; | |
import br.com.avon.common.repository.remote.RestApi; |
NewerOlder