Removes unused imports

This commit is contained in:
ericdecanini 2022-03-08 16:50:49 +01:00
parent eb46067c08
commit 82b5fc9557
2 changed files with 1 additions and 7 deletions

View file

@ -19,7 +19,6 @@ package org.matrix.android.sdk.internal.session.space
import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.GlobalErrorReceiver
import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.network.executeRequest
import org.matrix.android.sdk.internal.task.Task import org.matrix.android.sdk.internal.task.Task
import retrofit2.HttpException
import javax.inject.Inject import javax.inject.Inject
internal interface ResolveSpaceInfoTask : Task<ResolveSpaceInfoTask.Params, SpacesResponse> { internal interface ResolveSpaceInfoTask : Task<ResolveSpaceInfoTask.Params, SpacesResponse> {

View file

@ -18,13 +18,9 @@ package org.matrix.android.sdk.test.fakes
import io.mockk.coEvery import io.mockk.coEvery
import io.mockk.mockk import io.mockk.mockk
import okhttp3.ResponseBody.Companion.toResponseBody
import org.matrix.android.sdk.internal.session.space.SpaceApi import org.matrix.android.sdk.internal.session.space.SpaceApi
import org.matrix.android.sdk.internal.session.space.SpacesResponse
import org.matrix.android.sdk.test.fixtures.ResolveSpaceInfoTaskParamsFixture import org.matrix.android.sdk.test.fixtures.ResolveSpaceInfoTaskParamsFixture
import org.matrix.android.sdk.test.fixtures.SpacesResponseFixture import org.matrix.android.sdk.test.fixtures.SpacesResponseFixture
import retrofit2.HttpException
import retrofit2.Response
internal class FakeSpaceApi { internal class FakeSpaceApi {
@ -37,8 +33,7 @@ internal class FakeSpaceApi {
} }
fun givenStableEndpointFails() { fun givenStableEndpointFails() {
val errorResponse = Response.error<SpacesResponse>(500, "".toResponseBody()) coEvery { instance.getSpaceHierarchy(params.spaceId, params.suggestedOnly, params.limit, params.maxDepth, params.from) } throws Exception()
coEvery { instance.getSpaceHierarchy(params.spaceId, params.suggestedOnly, params.limit, params.maxDepth, params.from) } throws HttpException(errorResponse)
} }
fun givenUnstableEndpointWorks() { fun givenUnstableEndpointWorks() {