IMAP: Finish test when index 1 passed to areMoreMessagesAvailable

This commit is contained in:
Philip Whitehouse 2016-10-01 12:32:38 +02:00
parent 0a7de4b645
commit dfc3212ca5

View file

@ -787,6 +787,7 @@ public class ImapFolderTest {
assertFalse(result);
}
@Test
public void areMoreMessagesAvailable_withIndexOf1_shouldReturnFalseWithoutPerformingSearch() throws Exception {
ImapFolder folder = createFolder("Folder");
prepareImapFolderForOpen(OPEN_MODE_RW);
@ -794,7 +795,8 @@ public class ImapFolderTest {
boolean result = folder.areMoreMessagesAvailable(1, null);
verify(imapConnection, never()).executeSimpleCommand(anyString());
//SELECT during OPEN
verify(imapConnection, times(1)).executeSimpleCommand(anyString());
assertFalse(result);
}