Last active
March 12, 2023 14:21
-
-
Save bgoetzmann/16c3002e3baf2d215c16126c701339c3 to your computer and use it in GitHub Desktop.
Used in this article: https://medium.com/@bgoetzmann/modèle-de-conception-commande-en-langage-groovy-9bea26b47d6
This file contains 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
def fpCart = new Cart() | |
// Create command | |
def addItem1 = makeAddItemCommand(fpCart, new Item(name: 'Item1', price: 1)) | |
// Invoke command | |
addItem1() | |
assert fpCart.items.keySet() == ['Item1'] as Set |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment