@Test public void DraftMoveLoadAndDeleteEmail() { folderService.delete(completePath); folderService.createSubFolder(systemFolderName, userFolderLevel1); emailService.draftEmail(emailViewEntity); emailService.move(emailViewEntity, completePath); List<EmailViewEntity> eMVEList = (List<EmailViewEntity>) folderService.loadEmails(completePath); assertEquals((eMVEList.get(0).getId()), emailId); assertEquals((eMVEList.get(0).getFolder()), completePath); emailService.delete(emailViewEntity); folderService.delete(completePath); }
@Test public void DraftMoveToInboxSubfolderSearchAndDeleteEmail() { systemFolderName = "emails/Inbox"; userFolderLevel1 = "integrationtests"; completePath = systemFolderName + "/" + userFolderLevel1; folderService.delete(completePath); folderService.createSubFolder(systemFolderName, userFolderLevel1); emailService.draftEmail(emailViewEntity); emailService.move(emailViewEntity, completePath); List<EmailViewEntity> eMVEList = (List<EmailViewEntity>) folderService.searchEmails("Subject@IntegrationTests" + emailId); assertEquals((eMVEList.get(0).getId()), emailId); assertEquals((eMVEList.get(0).getFolder()), completePath); emailService.delete(emailViewEntity); folderService.delete(completePath); }