Skip to content

Instantly share code, notes, and snippets.

@talespadua
Last active March 15, 2022 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talespadua/8a7f4d75f1e955f68036bb7546e34953 to your computer and use it in GitHub Desktop.
Save talespadua/8a7f4d75f1e955f68036bb7546e34953 to your computer and use it in GitHub Desktop.
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