diff --git a/app/src/androidTest/java/h_mal/appttude/com/driver/BaseUiTest.kt b/app/src/androidTest/java/h_mal/appttude/com/driver/BaseUiTest.kt index 23d3f28..109c0ab 100644 --- a/app/src/androidTest/java/h_mal/appttude/com/driver/BaseUiTest.kt +++ b/app/src/androidTest/java/h_mal/appttude/com/driver/BaseUiTest.kt @@ -16,7 +16,7 @@ import org.junit.After import org.junit.Before -open class BaseUiTest>( +open class BaseUiTest>( private val activity: Class ) { diff --git a/app/src/androidTest/java/h_mal/appttude/com/driver/FirebaseTest.kt b/app/src/androidTest/java/h_mal/appttude/com/driver/FirebaseTest.kt index c495678..6189116 100644 --- a/app/src/androidTest/java/h_mal/appttude/com/driver/FirebaseTest.kt +++ b/app/src/androidTest/java/h_mal/appttude/com/driver/FirebaseTest.kt @@ -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>( activity: Class, diff --git a/app/src/androidTest/java/h_mal/appttude/com/driver/WebUtils.kt b/app/src/androidTest/java/h_mal/appttude/com/driver/WebUtils.kt index 1d82427..4b6b6c8 100644 --- a/app/src/androidTest/java/h_mal/appttude/com/driver/WebUtils.kt +++ b/app/src/androidTest/java/h_mal/appttude/com/driver/WebUtils.kt @@ -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 diff --git a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/api/FirebaseApi.kt b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/api/FirebaseApi.kt index da707da..7c9a9f0 100644 --- a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/api/FirebaseApi.kt +++ b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/api/FirebaseApi.kt @@ -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 // 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/" diff --git a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/api/NetworkConnectionInterceptor.kt b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/api/NetworkConnectionInterceptor.kt index eb081f9..c7084b4 100644 --- a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/api/NetworkConnectionInterceptor.kt +++ b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/api/NetworkConnectionInterceptor.kt @@ -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()) diff --git a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/OobCodeResponse.kt b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/OobCodeResponse.kt index 00dca1c..a5e83c7 100644 --- a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/OobCodeResponse.kt +++ b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/OobCodeResponse.kt @@ -1,9 +1,9 @@ package h_mal.appttude.com.driver.firebase.model data class OobCodeResponse( - val kind: String? = null, - val oobLink: String? = null, - val oobCode: String? = null, - val email: String? = null + val kind: String? = null, + val oobLink: String? = null, + val oobCode: String? = null, + val email: String? = null ) diff --git a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/ResetPasswordRequest.kt b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/ResetPasswordRequest.kt index 5018a97..02d2893 100644 --- a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/ResetPasswordRequest.kt +++ b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/ResetPasswordRequest.kt @@ -1,10 +1,10 @@ package h_mal.appttude.com.driver.firebase.model data class ResetPasswordRequest( - val oldPassword: String? = null, - val tenantId: String? = null, - val newPassword: String? = null, - val oobCode: String? = null, - val email: String? = null + val oldPassword: String? = null, + val tenantId: String? = null, + val newPassword: String? = null, + val oobCode: String? = null, + val email: String? = null ) diff --git a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/ResetPasswordResponse.kt b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/ResetPasswordResponse.kt index 8a18205..9a012f2 100644 --- a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/ResetPasswordResponse.kt +++ b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/ResetPasswordResponse.kt @@ -1,9 +1,9 @@ package h_mal.appttude.com.driver.firebase.model data class ResetPasswordResponse( - val requestType: String? = null, - val kind: String? = null, - val newEmail: String? = null, - val email: String? = null + val requestType: String? = null, + val kind: String? = null, + val newEmail: String? = null, + val email: String? = null ) diff --git a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/SignUpRequest.kt b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/SignUpRequest.kt index 6337c06..35f3abc 100644 --- a/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/SignUpRequest.kt +++ b/app/src/androidTest/java/h_mal/appttude/com/driver/firebase/model/SignUpRequest.kt @@ -1,7 +1,7 @@ package h_mal.appttude.com.driver.firebase.model data class SignUpRequest( - val password: String? = null, - val email: String? = null + val password: String? = null, + val email: String? = null )