-
-
Save virendersran01/2a12ac9de6916afe7a1ec66b90953836 to your computer and use it in GitHub Desktop.
CandidateAssessment - use cases
This file contains hidden or 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
interface DisplayCandidates { | |
fun all() | |
fun withName(name: String) | |
data class Candidate(val id: String, val name: String, val phoneNumbers: Collection<String>) { | |
internal companion object { | |
fun from(candidate: CandidateEntity) = Candidate(candidate.id, candidate.fullName, candidate.contactNumbers.map { it.phoneNumber }) | |
} | |
} | |
interface Presenter { | |
fun present(candidates: Collection<Candidate>) | |
} | |
interface Repository { | |
fun findByName(name: String) : Collection<CandidateEntity> | |
} | |
} |
This file contains hidden or 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
interface OpenDetailsScreen { | |
fun go(candidateId: String) | |
interface Presenter { | |
fun present(candidateId: String) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment