@Test public void testGetAllMessageReferences() throws Exception { MessageReference messageReference0 = createMessageReference("1"); MessageReference messageReference1 = createMessageReference("2"); MessageReference messageReference2 = createMessageReference("3"); MessageReference messageReference3 = createMessageReference("4"); MessageReference messageReference4 = createMessageReference("5"); MessageReference messageReference5 = createMessageReference("6"); MessageReference messageReference6 = createMessageReference("7"); MessageReference messageReference7 = createMessageReference("8"); MessageReference messageReference8 = createMessageReference("9"); notificationData.addNotificationContent(createNotificationContent(messageReference8)); notificationData.addNotificationContent(createNotificationContent(messageReference7)); notificationData.addNotificationContent(createNotificationContent(messageReference6)); notificationData.addNotificationContent(createNotificationContent(messageReference5)); notificationData.addNotificationContent(createNotificationContent(messageReference4)); notificationData.addNotificationContent(createNotificationContent(messageReference3)); notificationData.addNotificationContent(createNotificationContent(messageReference2)); notificationData.addNotificationContent(createNotificationContent(messageReference1)); notificationData.addNotificationContent(createNotificationContent(messageReference0)); List<MessageReference> messageReferences = notificationData.getAllMessageReferences(); assertEquals(9, messageReferences.size()); assertEquals(messageReference0, messageReferences.get(0)); assertEquals(messageReference1, messageReferences.get(1)); assertEquals(messageReference2, messageReferences.get(2)); assertEquals(messageReference3, messageReferences.get(3)); assertEquals(messageReference4, messageReferences.get(4)); assertEquals(messageReference5, messageReferences.get(5)); assertEquals(messageReference6, messageReferences.get(6)); assertEquals(messageReference7, messageReferences.get(7)); assertEquals(messageReference8, messageReferences.get(8)); }
public ArrayList<MessageReference> getAllMessageReferences() { int newSize = activeNotifications.size() + additionalNotifications.size(); ArrayList<MessageReference> messageReferences = new ArrayList<MessageReference>(newSize); for (NotificationHolder holder : activeNotifications) { messageReferences.add(holder.content.messageReference); } for (NotificationContent content : additionalNotifications) { messageReferences.add(content.messageReference); } return messageReferences; }
NotificationData { public ArrayList<MessageReference> getAllMessageReferences() { int newSize = activeNotifications.size() + additionalNotifications.size(); ArrayList<MessageReference> messageReferences = new ArrayList<MessageReference>(newSize); for (NotificationHolder holder : activeNotifications) { messageReferences.add(holder.content.messageReference); } for (NotificationContent content : additionalNotifications) { messageReferences.add(content.messageReference); } return messageReferences; } }
NotificationData { public ArrayList<MessageReference> getAllMessageReferences() { int newSize = activeNotifications.size() + additionalNotifications.size(); ArrayList<MessageReference> messageReferences = new ArrayList<MessageReference>(newSize); for (NotificationHolder holder : activeNotifications) { messageReferences.add(holder.content.messageReference); } for (NotificationContent content : additionalNotifications) { messageReferences.add(content.messageReference); } return messageReferences; } NotificationData(Account account); }
NotificationData { public ArrayList<MessageReference> getAllMessageReferences() { int newSize = activeNotifications.size() + additionalNotifications.size(); ArrayList<MessageReference> messageReferences = new ArrayList<MessageReference>(newSize); for (NotificationHolder holder : activeNotifications) { messageReferences.add(holder.content.messageReference); } for (NotificationContent content : additionalNotifications) { messageReferences.add(content.messageReference); } return messageReferences; } NotificationData(Account account); AddNotificationResult addNotificationContent(NotificationContent content); boolean containsStarredMessages(); boolean hasSummaryOverflowMessages(); int getSummaryOverflowMessagesCount(); int getNewMessagesCount(); boolean isSingleMessageNotification(); NotificationHolder getHolderForLatestNotification(); List<NotificationContent> getContentForSummaryNotification(); int[] getActiveNotificationIds(); RemoveNotificationResult removeNotificationForMessage(MessageReference messageReference); Account getAccount(); int getUnreadMessageCount(); void setUnreadMessageCount(int unreadMessageCount); ArrayList<MessageReference> getAllMessageReferences(); }
NotificationData { public ArrayList<MessageReference> getAllMessageReferences() { int newSize = activeNotifications.size() + additionalNotifications.size(); ArrayList<MessageReference> messageReferences = new ArrayList<MessageReference>(newSize); for (NotificationHolder holder : activeNotifications) { messageReferences.add(holder.content.messageReference); } for (NotificationContent content : additionalNotifications) { messageReferences.add(content.messageReference); } return messageReferences; } NotificationData(Account account); AddNotificationResult addNotificationContent(NotificationContent content); boolean containsStarredMessages(); boolean hasSummaryOverflowMessages(); int getSummaryOverflowMessagesCount(); int getNewMessagesCount(); boolean isSingleMessageNotification(); NotificationHolder getHolderForLatestNotification(); List<NotificationContent> getContentForSummaryNotification(); int[] getActiveNotificationIds(); RemoveNotificationResult removeNotificationForMessage(MessageReference messageReference); Account getAccount(); int getUnreadMessageCount(); void setUnreadMessageCount(int unreadMessageCount); ArrayList<MessageReference> getAllMessageReferences();  }