Created
August 12, 2014 20:57
-
-
Save RobertFischer/96014870bde233f4e39b to your computer and use it in GitHub Desktop.
signIn method
This file contains hidden or 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
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