use of com.fsck.k9.message.extractors.PreviewResult in project k-9 by k9mail.
the class MessagePreviewCreatorTest method createPreview_withoutTextPart.
@Test
public void createPreview_withoutTextPart() throws Exception {
Message message = createDummyMessage();
when(encryptionDetector.isEncrypted(message)).thenReturn(false);
when(textPartFinder.findFirstTextPart(message)).thenReturn(null);
PreviewResult result = previewCreator.createPreview(message);
assertFalse(result.isPreviewTextAvailable());
assertEquals(PreviewType.NONE, result.getPreviewType());
verifyNoMoreInteractions(previewTextExtractor);
}
Aggregations