Skip to content

Instantly share code, notes, and snippets.

@RobertFischer
Created August 12, 2014 20:57
Show Gist options
  • Save RobertFischer/96014870bde233f4e39b to your computer and use it in GitHub Desktop.
Save RobertFischer/96014870bde233f4e39b to your computer and use it in GitHub Desktop.
signIn method
String signUp(Map namedArgs = [:], String firstName = 'Test', String lastName = 'User') {
namedArgs = namedArgs ?: [:] // In case they passed null to be a stinker
email = '[email protected]'
bothPasswords = "password"
setFullName(firstName, lastName)
organisation = namedArgs.remove('organisation') ?: "Webonise Farm"
phoneNumber = namedArgs.remove('phoneNumber') ?: "8001234567"
optionalTextingNumber = namedArgs.remove('optionalTextingNumber') ?: null
address = namedArgs.remove('address') ?: "9001 Glenwood Ave"
apartment = namedArgs.remove('apartment') ?: "100"
city = namedArgs.remove('city') ?: "Raleigh"
state = namedArgs.remove('state') ?: "North Carolina"
zipCode = namedArgs.remove('zip') ?: "12345"
if(namedArgs) throw new RuntimeException("Unknown Arguments: $namedArgs")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment