Skip to content

Commit

Permalink
Merge pull request #82 from jetbrains-academy/remove-action
Browse files Browse the repository at this point in the history
Remove REMOVE_FROM_COUNTER action
  • Loading branch information
nbirillo authored Oct 16, 2024
2 parents 0efb5f2 + ef01a1b commit 941de9d
Show file tree
Hide file tree
Showing 24 changed files with 0 additions and 26 deletions.
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

0 comments on commit 941de9d

Please sign in to comment.