Last active
March 15, 2022 09:25
-
-
Save talespadua/8a7f4d75f1e955f68036bb7546e34953 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package ddd_workshop | |
import "testing" | |
func TestSelection(t *testing.T){ | |
selection := Selection{} | |
meals := []int{1, 2, 3} | |
selection.AddMeals(meals) | |
assert.Equal(t, meals, selection.meals) | |
selection.removeMeal(1) | |
selection.AddMeal(4) | |
assert.Equal(t, []int{2, 3, 4}, selection.meals) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment