Skip to content

Instantly share code, notes, and snippets.

@paganotoni
Created December 31, 2011 01:11
Show Gist options
  • Save paganotoni/1542335 to your computer and use it in GitHub Desktop.
Save paganotoni/1542335 to your computer and use it in GitHub Desktop.
Adding Hash of parameters for ControllerUnitTest on groovy
def parameters = [ title: "Basic", company:"Experience", location:"Boston", type: "Senior", salary: "80k", description: " BAsic desc", experience: "Experience", draft: "false", email: "antonio@pagano.com",industries: "Ind1, ind2", functions: "BB", experiences: "experiences",skills: "Skill1" ]
parameters.each{
controller.params."${it.key}" = it.value
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment