-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d840e1
commit 67a5acf
Showing
12 changed files
with
33 additions
and
97 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
14 changes: 14 additions & 0 deletions
14
...otlin/oscar/c/pozas/playgroud/context/pokemon/app/usecase/GetPokemonByIdCommandHandler.kt
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,14 @@ | ||
package oscar.c.pozas.playgroud.context.pokemon.app.usecase | ||
|
||
import oscar.c.pozas.playgroud.context.pokemon.domain.Pokemon | ||
import oscar.c.pozas.playgroud.context.pokemon.domain.service.PokemonFinder | ||
|
||
class GetPokemonByIdCommandHandler(private val pokemonFinder: PokemonFinder) { | ||
|
||
operator fun invoke(command: GetPokemonByIdCommand): Pokemon { | ||
val id = Pokemon.Id(command.id) | ||
return pokemonFinder(id)!! | ||
} | ||
} | ||
|
||
data class GetPokemonByIdCommand(val id: Int) |
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 |
---|---|---|
|
@@ -8,6 +8,4 @@ data class Pokemon( | |
data class Id(val value: Int) | ||
|
||
data class Name(val value: 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
17 changes: 0 additions & 17 deletions
17
.../src/main/kotlin/oscar/c/pozas/playgroud/context/pokemon/domain/service/PokemonCreator.kt
This file was deleted.
Oops, something went wrong.
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: 0 additions & 5 deletions
5
...oscar/c/pozas/playgroud/context/pokemon/infrastructure/datasource/ClickHouseDataSource.kt
This file was deleted.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
...ce/PokemonApiDataSourceIntegrationTest.kt → ...re/PokemonApiDataSourceIntegrationTest.kt
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
6 changes: 6 additions & 0 deletions
6
kernel/src/main/kotlin/oscar/c/pozas/playground/kernel/DomainEvent.kt
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,6 @@ | ||
package oscar.c.pozas.playground.kernel | ||
|
||
abstract class DomainEvent { | ||
|
||
abstract fun getName(): String | ||
} |
38 changes: 0 additions & 38 deletions
38
src/test/kotlin/oscar/c/pozas/playground/domain/usecase/CreatePokemonUseCaseTest.kt
This file was deleted.
Oops, something went wrong.