-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1322 from wakmusic/1316-music-detail-artist-or-cr…
…edit 🔀 :: (#1316) 음악 상세에서 아티스트 이름 클릭 시 크레딧 혹은 아티스트 상세로 이동
- Loading branch information
Showing
18 changed files
with
163 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Projects/Domains/ArtistDomain/Interface/UseCase/FindArtistIDUseCase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import RxSwift | ||
|
||
public protocol FindArtistIDUseCase { | ||
func execute(name: String) -> Single<String> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Projects/Domains/ArtistDomain/Sources/ResponseDTO/FindArtistIDResponseDTO.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Foundation | ||
|
||
struct FindArtistIDResponseDTO: Decodable { | ||
let id: String | ||
} |
16 changes: 16 additions & 0 deletions
16
Projects/Domains/ArtistDomain/Sources/UseCase/FindArtistIDUseCaseImpl.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import ArtistDomainInterface | ||
import RxSwift | ||
|
||
public struct FindArtistIDUseCaseImpl: FindArtistIDUseCase { | ||
private let artistRepository: any ArtistRepository | ||
|
||
public init( | ||
artistRepository: any ArtistRepository | ||
) { | ||
self.artistRepository = artistRepository | ||
} | ||
|
||
public func execute(name: String) -> Single<String> { | ||
return artistRepository.findArtistID(name: name) | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Projects/Domains/ArtistDomain/Testing/UseCase/FindArtistIDUseCaseSpy.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import ArtistDomainInterface | ||
import RxSwift | ||
|
||
public final class FindArtistIDUseCaseSpy: FindArtistIDUseCase { | ||
public private(set) var callCount = 0 | ||
public var handler: ((String) -> Single<String>) = { _ in .never() } | ||
public func execute(name: String) -> Single<String> { | ||
callCount += 1 | ||
return handler(name) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.