package com.radiola.domain.usecase

import com.radiola.domain.model.DeeplinkService
import com.radiola.domain.model.Track
import org.junit.Assert.assertTrue
import org.junit.Test

class SearchTrackInServiceUseCaseTest {

    private val useCase = SearchTrackInServiceUseCase()

    @Test
    fun `invoke returns correct Yandex Music URL`() {
        val track = Track("Artist", "Song", null, "Record")
        val url = useCase(track, DeeplinkService.YANDEX)

        assertTrue(url.startsWith("https://music.yandex.ru/search"))
        assertTrue(url.contains("Artist"))
        assertTrue(url.contains("Song"))
    }

    @Test
    fun `invoke returns correct Spotify URL`() {
        val track = Track("Artist", "Song", null, "Record")
        val url = useCase(track, DeeplinkService.SPOTIFY)

        assertTrue(url.startsWith("https://open.spotify.com/search"))
    }
}
