use of org.apache.wicket.feedback.ExactLevelFeedbackMessageFilter in project wicket by apache.
the class BaseWicketTester method getMessages.
/**
* Retrieves <code>FeedbackMessages</code>.
*
* @param level
* level of feedback message, for example:
* <code>FeedbackMessage.DEBUG or FeedbackMessage.INFO.. etc</code>
* @return <code>List</code> of messages (as <code>String</code>s)
* @see FeedbackMessage
*/
public List<Serializable> getMessages(final int level) {
List<FeedbackMessage> messages = getFeedbackMessages(new ExactLevelFeedbackMessageFilter(level));
List<Serializable> actualMessages = Generics.newArrayList();
for (FeedbackMessage message : messages) {
actualMessages.add(message.getMessage());
}
return actualMessages;
}
use of org.apache.wicket.feedback.ExactLevelFeedbackMessageFilter in project wicket by apache.
the class WicketTesterTest method renderComponentRelativeErrorMessage.
/**
* https://issues.apache.org/jira/browse/WICKET-5128
*/
@Test
public void renderComponentRelativeErrorMessage() {
tester.startPage(new ComponentFeedbackResourceTestingPage());
Component label = tester.getComponentFromLastRenderedPage("label");
tester.assertComponentFeedbackMessage(label, "error.msg", null, new ExactLevelFeedbackMessageFilter(FeedbackMessage.ERROR));
}
use of org.apache.wicket.feedback.ExactLevelFeedbackMessageFilter in project wicket by apache.
the class WicketTesterTest method renderComponentRelativeInfoMessage.
/**
* https://issues.apache.org/jira/browse/WICKET-5128
*/
@Test
public void renderComponentRelativeInfoMessage() {
tester.startPage(new ComponentFeedbackResourceTestingPage());
Component label = tester.getComponentFromLastRenderedPage("label");
tester.assertComponentFeedbackMessage(label, "info.msg", null, new ExactLevelFeedbackMessageFilter(FeedbackMessage.INFO));
}
Aggregations