@Test
  public void testExpandMailbox() throws Exception {
    int customerID = m_user.getCustomerID();
    int userID = m_user.getUserID();
    String maildir = m_user.getMailDir();
    long messageId = 7890;

    EasyMock.reset(m_mockStoreManager);
    executeRequest(
        500, "uid", -1, "pid", 1, "cid", customerID, "mid", messageId, "private", "true");

    EasyMock.reset(m_mockStoreManager);
    EasyMock.expect(m_mockStoreManager.expandMessageToMeta(customerID, maildir, messageId, 1, true))
        .andReturn(true);
    executeRequest(200, "pid", 1, "uid", userID, "mid", messageId, "sender", "true");

    EasyMock.reset(m_mockStoreManager);
    EasyMock.expect(
            m_mockStoreManager.expandMessageToMeta(customerID, maildir, messageId, 1, false))
        .andReturn(true);
    executeRequest(
        200, "pid", 1, "cid", customerID, "uid", userID, "mid", messageId, "sender", "false");

    EasyMock.reset(m_mockStoreManager);
    EasyMock.expect(
            m_mockStoreManager.expandMessageToMeta(customerID, maildir, messageId, 1, false))
        .andReturn(false);
    executeRequest(
        500, "pid", 1, "cid", customerID, "uid", userID, "mid", messageId, "sender", "false");
  }
Exemplo n.º 2
0
 public File getEventLogFile(UserAccount user, int eventId) {
   return getEventLogFile(new File(getNfsRoot(), user.getMailDir()), eventId);
 }