- mid commit

This commit is contained in:
2023-05-15 19:29:03 +01:00
parent b12af77a31
commit 74b1b53af0
9 changed files with 24 additions and 25 deletions

View File

@@ -16,7 +16,7 @@ import org.junit.After
import org.junit.Before
open class BaseUiTest<T : BaseActivity<*,*>>(
open class BaseUiTest<T : BaseActivity<*, *>>(
private val activity: Class<T>
) {

View File

@@ -1,17 +1,14 @@
package h_mal.appttude.com.driver
import androidx.test.espresso.intent.rule.IntentsRule
import com.google.firebase.auth.FirebaseAuth
import com.google.firebase.database.FirebaseDatabase
import com.google.firebase.storage.FirebaseStorage
import h_mal.appttude.com.driver.base.BaseActivity
import h_mal.appttude.com.driver.data.FirebaseAuthSource
import h_mal.appttude.com.driver.utils.GenericsHelper.getGenericClassAt
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.tasks.await
import org.junit.After
import org.junit.BeforeClass
import org.junit.Rule
open class FirebaseTest<T : BaseActivity<*, *>>(
activity: Class<T>,

View File

@@ -3,8 +3,12 @@ package h_mal.appttude.com.driver
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import kotlinx.coroutines.suspendCancellableCoroutine
import okhttp3.*
import okhttp3.Call
import okhttp3.Callback
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody
import okhttp3.Response
import java.io.IOException
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException

View File

@@ -7,9 +7,7 @@ import retrofit2.Response
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.PUT
import retrofit2.http.Query
interface FirebaseApi {
@@ -26,8 +24,8 @@ interface FirebaseApi {
suspend fun resetPassword(@Body request: ResetPasswordRequest): Response<ResetPasswordResponse>
// invoke method creating an invocation of the api call
companion object{
operator fun invoke() : FirebaseApi {
companion object {
operator fun invoke(): FirebaseApi {
val host = "10.0.2.2"
val baseUrl = "http://$host:9099/identitytoolkit.googleapis.com/"

View File

@@ -13,7 +13,7 @@ class NetworkConnectionInterceptor(
private val applicationContext = context.applicationContext
override fun intercept(chain: Interceptor.Chain): okhttp3.Response {
if (!isInternetAvailable()){
if (!isInternetAvailable()) {
throw IOException("Make sure you have an active data connection")
}
return chain.proceed(chain.request())