Skip to content

Instantly share code, notes, and snippets.

@searls
Created October 23, 2010 19:35
Show Gist options
  • Save searls/642600 to your computer and use it in GitHub Desktop.
Save searls/642600 to your computer and use it in GitHub Desktop.
public static <T extends ActionSupport> Matcher<T> hasActionMessage(final String messageText) {
return new TypeSafeMatcher<T>() {
public boolean matchesSafely(T action) {
return action.getActionMessages().contains(messageText);
}
public void describeTo(Description description) {
description.appendText("contains action message text '"+messageText+"'");
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment