Created
December 17, 2018 15:32
-
-
Save macieknajbar/9bee5d61765eb33deaa3e767128957e4 to your computer and use it in GitHub Desktop.
CandidateAssessment - use cases
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
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 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