diff --git a/owncloudDomain/src/test/java/com/owncloud/android/domain/files/model/OCFileTest.kt b/owncloudDomain/src/test/java/com/owncloud/android/domain/files/model/OCFileTest.kt index bb421c0f5c6..ccfd34d964d 100644 --- a/owncloudDomain/src/test/java/com/owncloud/android/domain/files/model/OCFileTest.kt +++ b/owncloudDomain/src/test/java/com/owncloud/android/domain/files/model/OCFileTest.kt @@ -47,6 +47,7 @@ class OCFileTest { OC_FILE.treeEtag, OC_FILE.availableOfflineStatus, OC_FILE.lastSyncDateForData, + OC_FILE.lastUsage, OC_FILE.needsToUpdateThumbnail, OC_FILE.modifiedAtLastSyncForData, OC_FILE.etagInConflict, @@ -72,6 +73,7 @@ class OCFileTest { treeEtag = OC_FILE.treeEtag, availableOfflineStatus = OC_FILE.availableOfflineStatus, lastSyncDateForData = OC_FILE.lastSyncDateForData, + lastUsage = OC_FILE.lastUsage, needsToUpdateThumbnail = OC_FILE.needsToUpdateThumbnail, modifiedAtLastSyncForData = OC_FILE.modifiedAtLastSyncForData, etagInConflict = OC_FILE.etagInConflict, @@ -103,6 +105,7 @@ class OCFileTest { OC_FILE.treeEtag, OC_FILE.availableOfflineStatus, OC_FILE.lastSyncDateForData, + OC_FILE.lastUsage, OC_FILE.needsToUpdateThumbnail, OC_FILE.modifiedAtLastSyncForData, OC_FILE.etagInConflict, @@ -128,6 +131,7 @@ class OCFileTest { treeEtag = OC_FILE.treeEtag, availableOfflineStatus = OC_FILE.availableOfflineStatus, lastSyncDateForData = OC_FILE.lastSyncDateForData, + lastUsage = OC_FILE.lastUsage, needsToUpdateThumbnail = OC_FILE.needsToUpdateThumbnail, modifiedAtLastSyncForData = OC_FILE.modifiedAtLastSyncForData, etagInConflict = OC_FILE.etagInConflict, diff --git a/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/MoveFileUseCaseTest.kt b/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/MoveFileUseCaseTest.kt index cb595dfc255..fc2faeeda08 100644 --- a/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/MoveFileUseCaseTest.kt +++ b/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/MoveFileUseCaseTest.kt @@ -25,6 +25,7 @@ import com.owncloud.android.domain.files.FileRepository import com.owncloud.android.testutil.OC_FILE import com.owncloud.android.testutil.OC_FOLDER import io.mockk.every +import io.mockk.mockk import io.mockk.spyk import io.mockk.verify import org.junit.Assert @@ -33,7 +34,8 @@ import org.junit.Test class MoveFileUseCaseTest { private val repository: FileRepository = spyk() - private val useCase = MoveFileUseCase(repository) + private val setLastUsageFileUseCase: SetLastUsageFileUseCase = mockk(relaxed = true) + private val useCase = MoveFileUseCase(repository, setLastUsageFileUseCase) private val useCaseParams = MoveFileUseCase.Params( listOfFilesToMove = listOf(OC_FILE.copy(remotePath = "/video.mp4", parentId = 123)), targetFolder = OC_FOLDER.copy(id = 100), diff --git a/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/RemoveFileUseCaseTest.kt b/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/RemoveFileUseCaseTest.kt index a19e2a5b713..dd9913161b0 100644 --- a/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/RemoveFileUseCaseTest.kt +++ b/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/RemoveFileUseCaseTest.kt @@ -23,6 +23,7 @@ import com.owncloud.android.domain.files.FileRepository import com.owncloud.android.testutil.OC_FILE import com.owncloud.android.testutil.OC_FOLDER import io.mockk.every +import io.mockk.mockk import io.mockk.spyk import io.mockk.verify import org.junit.Assert.assertEquals @@ -31,7 +32,8 @@ import org.junit.Test class RemoveFileUseCaseTest { private val repository: FileRepository = spyk() - private val useCase = RemoveFileUseCase(repository) + private val setLastUsageFileUseCase: SetLastUsageFileUseCase = mockk(relaxed = true) + private val useCase = RemoveFileUseCase(repository, setLastUsageFileUseCase) private val useCaseParams = RemoveFileUseCase.Params(listOf(OC_FILE, OC_FOLDER), removeOnlyLocalCopy = true) @Test diff --git a/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/RenameFileUseCaseTest.kt b/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/RenameFileUseCaseTest.kt index 5a42f58cfc9..d5579ca8676 100644 --- a/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/RenameFileUseCaseTest.kt +++ b/owncloudDomain/src/test/java/com/owncloud/android/domain/files/usecases/RenameFileUseCaseTest.kt @@ -22,6 +22,7 @@ import com.owncloud.android.domain.exceptions.UnauthorizedException import com.owncloud.android.domain.files.FileRepository import com.owncloud.android.testutil.OC_FILE import io.mockk.every +import io.mockk.mockk import io.mockk.spyk import io.mockk.verify import org.junit.Assert.assertEquals @@ -30,7 +31,8 @@ import org.junit.Test class RenameFileUseCaseTest { private val repository: FileRepository = spyk() - private val useCase = RenameFileUseCase(repository) + private val setLastUsageFileUseCase: SetLastUsageFileUseCase = mockk(relaxed = true) + private val useCase = RenameFileUseCase(repository, setLastUsageFileUseCase) private val useCaseParams = RenameFileUseCase.Params(OC_FILE, "Video.mp4") @Test