Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove REMOVE_FROM_COUNTER action #82

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data object KitchenImpl : Kitchen {
override fun <T : Ingredient> take(item: T): T {
require(item in filling) { "You cannot remove an item from the kitchen if this item does not exist!" }
filling.remove(item)
actions += buildAction(ActionType.REMOVE_FROM_COUNTER, item)
return item
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ enum class ActionType {
MIX_SALAD, // null
BLEND, // null
ADD_TO_BLENDER, // fruits
REMOVE_FROM_COUNTER, // baskets, fruits, vegetables
CUT_ON_COUNTER, // Cut a fruit or a vegetable
}
1 change: 0 additions & 1 deletion culinaryServer/culinaryServerAddSpices/test/Tests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class Test {
}
repeat(NUMBER_OF_TOMATOES) {
addAll(listOf(
Action(ActionType.REMOVE_FROM_COUNTER, ItemType.CUT_TOMATO),
Action(ActionType.PUT_IN_POT, ItemType.CUT_TOMATO)
))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data object KitchenImpl : Kitchen {
override fun <T : Ingredient> take(item: T): T {
require(item in filling) { "You cannot remove an item from the kitchen if this item does not exist!" }
filling.remove(item)
actions += buildAction(ActionType.REMOVE_FROM_COUNTER, item)
return item
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ enum class ActionType {
MIX_SALAD, // null
BLEND, // null
ADD_TO_BLENDER, // fruits
REMOVE_FROM_COUNTER, // baskets, fruits, vegetables
CUT_ON_COUNTER, // Cut a fruit or a vegetable
}
2 changes: 0 additions & 2 deletions culinaryServer/culinaryServerCookSalad/test/Tests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class Test {
repeat(vegetables.size) {
addAll(listOf(ActionType.CUT_ON_COUNTER, ActionType.SHOW_ON_COUNTER))
}
addAll(List(NUM_VEGETABLES_FOR_SALAD) { ActionType.REMOVE_FROM_COUNTER })
}
assert(expectedActions == actions.map{ it.type }) { "The ${method.name} method should take vegetables and cut them: take each of them from the fridge, and then cut" }
}
Expand Down Expand Up @@ -153,7 +152,6 @@ class Test {
}
repeat(NUMBER_OF_TOMATOES) {
addAll(listOf(
Action(ActionType.REMOVE_FROM_COUNTER, ItemType.CUT_TOMATO),
Action(ActionType.PUT_IN_POT, ItemType.CUT_TOMATO)
))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data object KitchenImpl : Kitchen {
override fun <T : Ingredient> take(item: T): T {
require(item in filling) { "You cannot remove an item from the kitchen if this item does not exist!" }
filling.remove(item)
actions += buildAction(ActionType.REMOVE_FROM_COUNTER, item)
return item
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ enum class ActionType {
MIX_SALAD, // null
BLEND, // null
ADD_TO_BLENDER, // fruits
REMOVE_FROM_COUNTER, // baskets, fruits, vegetables
CUT_ON_COUNTER, // Cut a fruit or a vegetable
}
2 changes: 0 additions & 2 deletions culinaryServer/culinaryServerCookSmoothie/test/Tests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class Test {
repeat(vegetables.size) {
addAll(listOf(ActionType.CUT_ON_COUNTER, ActionType.SHOW_ON_COUNTER))
}
addAll(List(NUM_VEGETABLES_FOR_SALAD) { ActionType.REMOVE_FROM_COUNTER })
}
assert(expectedActions == actions.map{ it.type }) { "The ${method.name} method should take vegetables and cut them: take each of them from the fridge, and then cut" }
}
Expand Down Expand Up @@ -153,7 +152,6 @@ class Test {
}
repeat(NUMBER_OF_TOMATOES) {
addAll(listOf(
Action(ActionType.REMOVE_FROM_COUNTER, ItemType.CUT_TOMATO),
Action(ActionType.PUT_IN_POT, ItemType.CUT_TOMATO)
))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data object KitchenImpl : Kitchen {
override fun <T : Ingredient> take(item: T): T {
require(item in filling) { "You cannot remove an item from the kitchen if this item does not exist!" }
filling.remove(item)
actions += buildAction(ActionType.REMOVE_FROM_COUNTER, item)
return item
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ enum class ActionType {
MIX_SALAD, // null
BLEND, // null
ADD_TO_BLENDER, // fruits
REMOVE_FROM_COUNTER, // baskets, fruits, vegetables
CUT_ON_COUNTER, // Cut a fruit or a vegetable
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data object KitchenImpl : Kitchen {
override fun <T : Ingredient> take(item: T): T {
require(item in filling) { "You cannot remove an item from the kitchen if this item does not exist!" }
filling.remove(item)
actions += buildAction(ActionType.REMOVE_FROM_COUNTER, item)
return item
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ enum class ActionType {
MIX_SALAD, // null
BLEND, // null
ADD_TO_BLENDER, // fruits
REMOVE_FROM_COUNTER, // baskets, fruits, vegetables
CUT_ON_COUNTER, // Cut a fruit or a vegetable
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data object KitchenImpl : Kitchen {
override fun <T : Ingredient> take(item: T): T {
require(item in filling) { "You cannot remove an item from the kitchen if this item does not exist!" }
filling.remove(item)
actions += buildAction(ActionType.REMOVE_FROM_COUNTER, item)
return item
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ enum class ActionType {
MIX_SALAD, // null
BLEND, // null
ADD_TO_BLENDER, // fruits
REMOVE_FROM_COUNTER, // baskets, fruits, vegetables
CUT_ON_COUNTER, // Cut a fruit or a vegetable
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data object KitchenImpl : Kitchen {
override fun <T : Ingredient> take(item: T): T {
require(item in filling) { "You cannot remove an item from the kitchen if this item does not exist!" }
filling.remove(item)
actions += buildAction(ActionType.REMOVE_FROM_COUNTER, item)
return item
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ enum class ActionType {
MIX_SALAD, // null
BLEND, // null
ADD_TO_BLENDER, // fruits
REMOVE_FROM_COUNTER, // baskets, fruits, vegetables
CUT_ON_COUNTER, // Cut a fruit or a vegetable
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data object KitchenImpl : Kitchen {
override fun <T : Ingredient> take(item: T): T {
require(item in filling) { "You cannot remove an item from the kitchen if this item does not exist!" }
filling.remove(item)
actions += buildAction(ActionType.REMOVE_FROM_COUNTER, item)
return item
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ enum class ActionType {
MIX_SALAD, // null
BLEND, // null
ADD_TO_BLENDER, // fruits
REMOVE_FROM_COUNTER, // baskets, fruits, vegetables
CUT_ON_COUNTER, // Cut a fruit or a vegetable
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data object KitchenImpl : Kitchen {
override fun <T : Ingredient> take(item: T): T {
require(item in filling) { "You cannot remove an item from the kitchen if this item does not exist!" }
filling.remove(item)
actions += buildAction(ActionType.REMOVE_FROM_COUNTER, item)
return item
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ enum class ActionType {
MIX_SALAD, // null
BLEND, // null
ADD_TO_BLENDER, // fruits
REMOVE_FROM_COUNTER, // baskets, fruits, vegetables
CUT_ON_COUNTER, // Cut a fruit or a vegetable
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ data object KitchenImpl : Kitchen {
override fun <T : Ingredient> take(item: T): T {
require(item in filling) { "You cannot remove an item from the kitchen if this item does not exist!" }
filling.remove(item)
actions += buildAction(ActionType.REMOVE_FROM_COUNTER, item)
return item
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ enum class ActionType {
MIX_SALAD, // null
BLEND, // null
ADD_TO_BLENDER, // fruits
REMOVE_FROM_COUNTER, // baskets, fruits, vegetables
CUT_ON_COUNTER, // Cut a fruit or a vegetable
}
1 change: 0 additions & 1 deletion culinaryServer/culinaryServerTomatoSoup/test/Tests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class Test {
}
repeat(NUMBER_OF_TOMATOES) {
addAll(listOf(
Action(ActionType.REMOVE_FROM_COUNTER, ItemType.CUT_TOMATO),
Action(ActionType.PUT_IN_POT, ItemType.CUT_TOMATO)
))
}
Expand Down
Loading