Skip to content

Commit

Permalink
Polishment
Browse files Browse the repository at this point in the history
  • Loading branch information
abelgardep committed Jul 20, 2022
1 parent 5db221e commit 686a267
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import android.content.Context
import android.database.Cursor
import android.net.Uri
import android.os.RemoteException
import androidx.core.util.Pair
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta.CAPABILITIES_CORE_POLLINTERVAL
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta.CAPABILITIES_DAV_CHUNKING_VERSION
Expand Down Expand Up @@ -83,7 +82,6 @@ import kotlinx.coroutines.withContext
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
import timber.log.Timber
import java.util.Vector

class FileDataStorageManager : KoinComponent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class RemoveFilesDialogFragment : ConfirmationDialogFragment(), ConfirmationDial
containsDown = true
}
if (file.isAvailableOffline) {
containsAvailableOffline = true;
containsAvailableOffline = true
}
}
messageStringId = if (files.size == 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package com.owncloud.android.domain.availableoffline.model

import com.owncloud.android.domain.ext.isOneOf

enum class AvailableOfflineStatus {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package com.owncloud.android.domain.availableoffline.usecases

import com.owncloud.android.domain.BaseUseCase
import com.owncloud.android.domain.BaseUseCaseWithResult
import com.owncloud.android.domain.files.FileRepository
import com.owncloud.android.domain.files.model.OCFile

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
*/
package com.owncloud.android.domain.files.usecases

import com.owncloud.android.domain.availableoffline.usecases.GetFilesAvailableOfflineUseCase
import com.owncloud.android.domain.availableoffline.usecases.GetFilesAvailableOfflineFromAccountUseCase
import com.owncloud.android.domain.exceptions.UnauthorizedException
import com.owncloud.android.domain.files.FileRepository
import com.owncloud.android.testutil.OC_EMPTY_FILES
import com.owncloud.android.testutil.OC_AVAILABLE_OFFLINE_FILES
import com.owncloud.android.testutil.OC_EMPTY_FILES
import io.mockk.every
import io.mockk.spyk
import io.mockk.verify
import org.junit.Assert
import org.junit.Test

class GetFilesAvailableOfflineUseCaseTest {
class GetFilesAvailableOfflineFromAccountUseCaseTest {

private val repository: FileRepository = spyk()
private val useCase = GetFilesAvailableOfflineUseCase(repository)
private val useCaseParams = GetFilesAvailableOfflineUseCase.Params(owner = "owner")
private val useCase = GetFilesAvailableOfflineFromAccountUseCase(repository)
private val useCaseParams = GetFilesAvailableOfflineFromAccountUseCase.Params(owner = "owner")

@Test
fun `get files available offline - ok`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ val OC_FILE = OCFile(
modificationTimestamp = 1593510589000,
etag = "5efb0c13c688f",
mimeType = "image/jpeg",
length = 3000000
length = 3000000,
availableOfflineStatus = AvailableOfflineStatus.NOT_AVAILABLE_OFFLINE,
)

val OC_AVAILABLE_OFFLINE_FILE = OCFile(
Expand Down

0 comments on commit 686a267

Please sign in to comment.