Skip to content

Instantly share code, notes, and snippets.

@britter
Created June 12, 2013 20:11
Show Gist options
  • Save britter/5768699 to your computer and use it in GitHub Desktop.
Save britter/5768699 to your computer and use it in GitHub Desktop.
@Test
public void testExecuteDispatchLookup_2() {
// use default catalog
catalog.addCommand("barCommand", new TestCommand<Context<String, Object>>("2"));
// command should lookup the fooCommand and execute the fooMethod
command.setName("fooCommand");
command.setMethod("fooMethod");
try {
command.execute(context);
} catch (IllegalArgumentException e) {
// test passed
return;
} catch (Exception e) {
// this is a failure
}
fail("Expected IllegalArgumentException");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment