Skip to content

Instantly share code, notes, and snippets.

@brunkb
Created January 6, 2015 05:11
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 brunkb/a8e4024d33aa3eb9ebf0 to your computer and use it in GitHub Desktop.
Save brunkb/a8e4024d33aa3eb9ebf0 to your computer and use it in GitHub Desktop.
Mock Inventory System
class InventorySystem {
boolean open(String token) {
// open a socket connection to some back-end mainframe system
println "opening connection to mainframe, token: ${token}"
true
}
BigDecimal pricingLookup(String clientId, String itemUuid)
{
// call the back end system to get the price of an item for a particular client
// send back a mock price as the result:
100.00
}
boolean close() {
// close the socket connection
println "closing connection to mainframe"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment