@Test public void the_message_list_contains_all_global_messages() { final FacesMessage message = new FacesMessage(SEVERITY_INFO, "", ""); prepareExpectedMessages(singletonList(message)); List<FacesMessage> facesMessages = new BootstrappedMessages().getFacesMessages(); assertThat(facesMessages).isEqualTo(singletonList(message)); }
public List<FacesMessage> getFacesMessages() { List<FacesMessage> messageList = new ArrayList<>(); Iterator<FacesMessage> messageItr = getFacesContext().getMessages(null); while (messageItr.hasNext()) { FacesMessage message = messageItr.next(); messageList.add(message); messageItr.remove(); } return messageList; }
BootstrappedMessages extends UINamingContainer { public List<FacesMessage> getFacesMessages() { List<FacesMessage> messageList = new ArrayList<>(); Iterator<FacesMessage> messageItr = getFacesContext().getMessages(null); while (messageItr.hasNext()) { FacesMessage message = messageItr.next(); messageList.add(message); messageItr.remove(); } return messageList; } }
BootstrappedMessages extends UINamingContainer { public List<FacesMessage> getFacesMessages() { List<FacesMessage> messageList = new ArrayList<>(); Iterator<FacesMessage> messageItr = getFacesContext().getMessages(null); while (messageItr.hasNext()) { FacesMessage message = messageItr.next(); messageList.add(message); messageItr.remove(); } return messageList; }  }
BootstrappedMessages extends UINamingContainer { public List<FacesMessage> getFacesMessages() { List<FacesMessage> messageList = new ArrayList<>(); Iterator<FacesMessage> messageItr = getFacesContext().getMessages(null); while (messageItr.hasNext()) { FacesMessage message = messageItr.next(); messageList.add(message); messageItr.remove(); } return messageList; }  List<FacesMessage> getFacesMessages(); }
BootstrappedMessages extends UINamingContainer { public List<FacesMessage> getFacesMessages() { List<FacesMessage> messageList = new ArrayList<>(); Iterator<FacesMessage> messageItr = getFacesContext().getMessages(null); while (messageItr.hasNext()) { FacesMessage message = messageItr.next(); messageList.add(message); messageItr.remove(); } return messageList; }  List<FacesMessage> getFacesMessages();  }