Skip to content

Commit

Permalink
Bitrise corrections - changes in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Nov 2, 2023
1 parent af99be0 commit 6fd3e6c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6fd3e6c

Please sign in to comment.