Skip to content

Commit

Permalink
tests: fix
Browse files Browse the repository at this point in the history
Need to mock paths now
  • Loading branch information
OxygenCobalt committed Dec 20, 2023
1 parent c995eb0 commit 5562c18
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import org.oxycblt.auxio.music.device.ArtistImpl
import org.oxycblt.auxio.music.device.DeviceLibraryImpl
import org.oxycblt.auxio.music.device.GenreImpl
import org.oxycblt.auxio.music.device.SongImpl
import org.oxycblt.auxio.music.fs.Components
import org.oxycblt.auxio.music.fs.Path

class DeviceLibraryTest {

Expand All @@ -42,12 +44,14 @@ class DeviceLibraryTest {
mockk<SongImpl> {
every { uid } returns songUidA
every { durationMs } returns 0
every { path } returns Path(mockk(), Components.parse("./"))
every { finalize() } returns this
}
val songB =
mockk<SongImpl> {
every { uid } returns songUidB
every { durationMs } returns 1
every { path } returns Path(mockk(), Components.parse("./"))
every { finalize() } returns this
}
val deviceLibrary = DeviceLibraryImpl(listOf(songA, songB), listOf(), listOf(), listOf())
Expand Down Expand Up @@ -156,11 +160,13 @@ class DeviceLibraryTest {
val songA =
mockk<SongImpl> {
every { uid } returns Music.UID.auxio(MusicType.SONGS)
every { path } returns Path(mockk(), Components.parse("./"))
every { finalize() } returns this
}
val songB =
mockk<SongImpl> {
every { uid } returns Music.UID.auxio(MusicType.SONGS)
every { path } returns Path(mockk(), Components.parse("./"))
every { finalize() } returns this
}
val album =
Expand Down

0 comments on commit 5562c18

Please sign in to comment.