Skip to content

Instantly share code, notes, and snippets.

@bgoetzmann
Last active March 12, 2023 14:21
Show Gist options
  • Save bgoetzmann/16c3002e3baf2d215c16126c701339c3 to your computer and use it in GitHub Desktop.
Save bgoetzmann/16c3002e3baf2d215c16126c701339c3 to your computer and use it in GitHub Desktop.
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