Fix code analysis errors
This commit is contained in:
parent
e4f42baaed
commit
8e9b14cecc
34 changed files with 71 additions and 79 deletions
|
|
@ -15,7 +15,9 @@ import org.fnives.test.showcase.model.content.Content
|
|||
import org.fnives.test.showcase.model.shared.Resource
|
||||
import org.fnives.test.showcase.network.content.ContentRemoteSource
|
||||
|
||||
internal class ContentRepository @LoggedInModuleInject constructor(private val contentRemoteSource: ContentRemoteSource) {
|
||||
internal class ContentRepository @LoggedInModuleInject constructor(
|
||||
private val contentRemoteSource: ContentRemoteSource
|
||||
) {
|
||||
|
||||
private val mutableContentFlow = MutableStateFlow(Optional<List<Content>>(null))
|
||||
private val requestFlow: Flow<Resource<List<Content>>> = flow {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import org.fnives.test.showcase.core.storage.NetworkSessionLocalStorageAdapter
|
|||
import org.fnives.test.showcase.core.storage.UserDataLocalStorage
|
||||
import org.fnives.test.showcase.network.session.NetworkSessionExpirationListener
|
||||
import org.fnives.test.showcase.network.session.NetworkSessionLocalStorage
|
||||
import org.fnives.test.showcase.core.di.hilt.ReloadLoggedInModuleInjectModule
|
||||
|
||||
@InstallIn(SingletonComponent::class)
|
||||
@Module
|
||||
|
|
@ -30,5 +29,5 @@ object CoreModule {
|
|||
fun provideLogoutUseCase(
|
||||
storage: UserDataLocalStorage,
|
||||
reloadLoggedInModuleInjectModule: ReloadLoggedInModuleInjectModule
|
||||
) : LogoutUseCase = LogoutUseCase(storage, reloadLoggedInModuleInjectModule)
|
||||
}
|
||||
): LogoutUseCase = LogoutUseCase(storage, reloadLoggedInModuleInjectModule)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ import org.fnives.library.reloadable.module.annotation.ReloadableModule
|
|||
@ReloadableModule
|
||||
@Target(AnnotationTarget.CONSTRUCTOR)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class LoggedInModuleInject
|
||||
annotation class LoggedInModuleInject
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package org.fnives.test.showcase.core.login
|
||||
|
||||
import org.fnives.test.showcase.core.di.hilt.ReloadLoggedInModuleInjectModule
|
||||
import org.fnives.test.showcase.core.di.koin.repositoryModule
|
||||
import org.fnives.test.showcase.core.storage.UserDataLocalStorage
|
||||
import org.koin.core.context.loadKoinModules
|
||||
import org.koin.mp.KoinPlatformTools
|
||||
import org.fnives.test.showcase.core.di.hilt.ReloadLoggedInModuleInjectModule
|
||||
|
||||
class LogoutUseCase(
|
||||
private val storage: UserDataLocalStorage,
|
||||
|
|
|
|||
|
|
@ -2,17 +2,11 @@ package org.fnives.test.showcase.core.login.hilt
|
|||
|
||||
import kotlinx.coroutines.test.runBlockingTest
|
||||
import org.fnives.test.showcase.core.content.ContentRepository
|
||||
import org.fnives.test.showcase.core.di.koin.createCoreModule
|
||||
import org.fnives.test.showcase.core.login.LogoutUseCase
|
||||
import org.fnives.test.showcase.core.storage.UserDataLocalStorage
|
||||
import org.fnives.test.showcase.model.network.BaseUrl
|
||||
import org.junit.jupiter.api.AfterEach
|
||||
import org.junit.jupiter.api.Assertions
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.koin.core.context.startKoin
|
||||
import org.koin.core.context.stopKoin
|
||||
import org.koin.test.KoinTest
|
||||
import org.mockito.kotlin.mock
|
||||
import org.mockito.kotlin.times
|
||||
import org.mockito.kotlin.verify
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import javax.inject.Singleton
|
|||
@Component(modules = [CoreModule::class, HiltNetworkModule::class, ReloadLoggedInModuleInjectModuleImpl::class, BindsBaseOkHttpClient::class])
|
||||
internal interface TestCoreComponent {
|
||||
|
||||
|
||||
@Component.Builder
|
||||
interface Builder {
|
||||
|
||||
|
|
@ -34,4 +33,4 @@ internal interface TestCoreComponent {
|
|||
}
|
||||
|
||||
fun inject(logoutUseCaseTest: LogoutUseCaseTest)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue