Remplacement des TODOs dans les DSL par une implémentation.

This commit is contained in:
FyloZ 2021-02-11 12:59:13 -05:00
parent 3c4eb78916
commit 54c7325725
3 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ data class MixMaterial(
// ==== DSL ====
fun mixMaterial(
id: Long? = null,
mix: Mix = TODO(),
mix: Mix = mix(),
material: Material = material(),
quantity: Float = 0f,
op: MixMaterial.() -> Unit = {}

View File

@ -30,7 +30,7 @@ data class RecipeStep(
// ==== DSL ====
fun recipeStep(
id: Long? = null,
recipe: Recipe? = TODO(), // TODO change default when recipe DSL is done
recipe: Recipe? = recipe(),
message: String = "message",
op: RecipeStep.() -> Unit = {}
) = RecipeStep(id, recipe, message).apply(op)

View File

@ -12,8 +12,8 @@ class RecipeStepServiceTest :
override val repository: RecipeStepRepository = mock()
override val service: RecipeStepService = spy(RecipeStepServiceImpl(repository))
override val entity: RecipeStep = recipeStep(id = 0L, recipe = TODO(), message = "message")
override val anotherEntity: RecipeStep = recipeStep(id = 1L, recipe = TODO(), message = "another message")
override val entity: RecipeStep = recipeStep(id = 0L, recipe = recipe(id = 0L), message = "message")
override val anotherEntity: RecipeStep = recipeStep(id = 1L, recipe = recipe(id = 1L), message = "another message")
@Nested
inner class CreateForRecipe {