-
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.
Fix #78 by redesigning add value menu
- add unit tests for AddValueButton, CreateOppositionValueForm, and CreateValueWebForm
- Loading branch information
1 parent
0291008
commit bb47da4
Showing
48 changed files
with
2,136 additions
and
190 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
8 changes: 6 additions & 2 deletions
8
...tlin/com/soyle/stories/theme/addOppositionToValueWeb/AddOppositionToValueWebController.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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
package com.soyle.stories.theme.addOppositionToValueWeb | ||
|
||
import com.soyle.stories.domain.validation.NonBlankString | ||
import com.soyle.stories.usecase.theme.addOppositionToValueWeb.OppositionAddedToValueWeb | ||
import kotlinx.coroutines.Deferred | ||
import kotlinx.coroutines.Job | ||
|
||
interface AddOppositionToValueWebController { | ||
|
||
fun addOpposition(valueWebId: String) | ||
fun addOppositionWithCharacter(valueWebId: String, name: NonBlankString, characterId: String) | ||
fun addOpposition(valueWebId: String): Deferred<OppositionAddedToValueWeb> | ||
fun addOpposition(valueWebId: String, name: NonBlankString): Deferred<OppositionAddedToValueWeb> | ||
fun addOppositionWithCharacter(valueWebId: String, name: NonBlankString, characterId: String): Deferred<OppositionAddedToValueWeb> | ||
|
||
} |
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: 4 additions & 2 deletions
6
...rc/main/kotlin/com/soyle/stories/theme/addValueWebToTheme/AddValueWebToThemeController.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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package com.soyle.stories.theme.addValueWebToTheme | ||
|
||
import com.soyle.stories.domain.validation.NonBlankString | ||
import com.soyle.stories.usecase.theme.addValueWebToTheme.ValueWebAddedToTheme | ||
import kotlinx.coroutines.Deferred | ||
|
||
interface AddValueWebToThemeController { | ||
|
||
fun addValueWebToTheme(themeId: String, name: NonBlankString, onError: (Throwable) -> Unit) | ||
fun addValueWebToThemeWithCharacter(themeId: String, name: NonBlankString, characterId: String, onError: (Throwable) -> Unit) | ||
fun addValueWebToTheme(themeId: String, name: NonBlankString, onError: (Throwable) -> Unit): Deferred<ValueWebAddedToTheme> | ||
fun addValueWebToThemeWithCharacter(themeId: String, name: NonBlankString, characterId: String, onError: (Throwable) -> Unit): Deferred<ValueWebAddedToTheme> | ||
|
||
} |
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
38 changes: 38 additions & 0 deletions
38
...me/valueWeb/opposition/list/ListAvailableOppositionValuesForCharacterInThemeController.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,38 @@ | ||
package com.soyle.stories.theme.valueWeb.opposition.list | ||
|
||
import com.soyle.stories.common.ThreadTransformer | ||
import com.soyle.stories.domain.character.Character | ||
import com.soyle.stories.domain.theme.Theme | ||
import com.soyle.stories.usecase.theme.listAvailableOppositionValuesForCharacterInTheme.ListAvailableOppositionValuesForCharacterInTheme | ||
import kotlinx.coroutines.Job | ||
|
||
interface ListAvailableOppositionValuesForCharacterInThemeController { | ||
companion object { | ||
|
||
operator fun invoke( | ||
threadTransformer: ThreadTransformer, | ||
getAvailableOppositionValuesForCharacterInTheme: ListAvailableOppositionValuesForCharacterInTheme | ||
): ListAvailableOppositionValuesForCharacterInThemeController = | ||
object : ListAvailableOppositionValuesForCharacterInThemeController { | ||
override fun listAvailableOppositionValuesForCharacter( | ||
themeId: Theme.Id, | ||
characterId: Character.Id, | ||
output: ListAvailableOppositionValuesForCharacterInTheme.OutputPort | ||
): Job { | ||
return threadTransformer.async { | ||
getAvailableOppositionValuesForCharacterInTheme( | ||
themeId.uuid, | ||
characterId.uuid, | ||
output | ||
) | ||
} | ||
} | ||
} | ||
} | ||
|
||
fun listAvailableOppositionValuesForCharacter( | ||
themeId: Theme.Id, | ||
characterId: Character.Id, | ||
output: ListAvailableOppositionValuesForCharacterInTheme.OutputPort | ||
): Job | ||
} |
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.