@Test public void createFromMessage_withRegularMessage() throws Exception { NotificationContent content = contentCreator.createFromMessage(account, message); assertEquals(messageReference, content.messageReference); assertEquals(SENDER_NAME, content.sender); assertEquals(SUBJECT, content.subject); assertEquals(SUBJECT + "\n" + PREVIEW, content.preview.toString()); assertEquals(SENDER_NAME + " " + SUBJECT, content.summary.toString()); assertEquals(false, content.starred); }
public NotificationContent createFromMessage(Account account, LocalMessage message) { MessageReference messageReference = message.makeMessageReference(); String sender = getMessageSender(account, message); String displaySender = getMessageSenderForDisplay(sender); String subject = getMessageSubject(message); CharSequence preview = getMessagePreview(message); CharSequence summary = buildMessageSummary(sender, subject); boolean starred = message.isSet(Flag.FLAGGED); return new NotificationContent(messageReference, displaySender, subject, preview, summary, starred); }
NotificationContentCreator { public NotificationContent createFromMessage(Account account, LocalMessage message) { MessageReference messageReference = message.makeMessageReference(); String sender = getMessageSender(account, message); String displaySender = getMessageSenderForDisplay(sender); String subject = getMessageSubject(message); CharSequence preview = getMessagePreview(message); CharSequence summary = buildMessageSummary(sender, subject); boolean starred = message.isSet(Flag.FLAGGED); return new NotificationContent(messageReference, displaySender, subject, preview, summary, starred); } }
NotificationContentCreator { public NotificationContent createFromMessage(Account account, LocalMessage message) { MessageReference messageReference = message.makeMessageReference(); String sender = getMessageSender(account, message); String displaySender = getMessageSenderForDisplay(sender); String subject = getMessageSubject(message); CharSequence preview = getMessagePreview(message); CharSequence summary = buildMessageSummary(sender, subject); boolean starred = message.isSet(Flag.FLAGGED); return new NotificationContent(messageReference, displaySender, subject, preview, summary, starred); } NotificationContentCreator(Context context); }
NotificationContentCreator { public NotificationContent createFromMessage(Account account, LocalMessage message) { MessageReference messageReference = message.makeMessageReference(); String sender = getMessageSender(account, message); String displaySender = getMessageSenderForDisplay(sender); String subject = getMessageSubject(message); CharSequence preview = getMessagePreview(message); CharSequence summary = buildMessageSummary(sender, subject); boolean starred = message.isSet(Flag.FLAGGED); return new NotificationContent(messageReference, displaySender, subject, preview, summary, starred); } NotificationContentCreator(Context context); NotificationContent createFromMessage(Account account, LocalMessage message); }
NotificationContentCreator { public NotificationContent createFromMessage(Account account, LocalMessage message) { MessageReference messageReference = message.makeMessageReference(); String sender = getMessageSender(account, message); String displaySender = getMessageSenderForDisplay(sender); String subject = getMessageSubject(message); CharSequence preview = getMessagePreview(message); CharSequence summary = buildMessageSummary(sender, subject); boolean starred = message.isSet(Flag.FLAGGED); return new NotificationContent(messageReference, displaySender, subject, preview, summary, starred); } NotificationContentCreator(Context context); NotificationContent createFromMessage(Account account, LocalMessage message);  }