Search in sources :

Example 6 with DirectInsertionMailboxManager

use of com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager in project zm-mailbox by Zimbra.

the class ReplaceHeaderTest method init.

@BeforeClass
public static void init() throws Exception {
    MailboxTestUtil.initServer();
    MailboxTestUtil.clearData();
    Provisioning prov = Provisioning.getInstance();
    Map<String, Object> attrs = Maps.newHashMap();
    prov.createDomain("zimbra.com", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    Account acct = prov.createAccount("test@zimbra.com", "secret", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    prov.createAccount("test2@zimbra.com", "secret", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    prov.createAccount("test3@zimbra.com", "secret", attrs);
    // this MailboxManager does everything except actually send mail
    MailboxManager.setInstance(new DirectInsertionMailboxManager());
}
Also used : Account(com.zimbra.cs.account.Account) Provisioning(com.zimbra.cs.account.Provisioning) DirectInsertionMailboxManager(com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager) BeforeClass(org.junit.BeforeClass)

Example 7 with DirectInsertionMailboxManager

use of com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager in project zm-mailbox by Zimbra.

the class RejectTest method init.

@BeforeClass
public static void init() throws Exception {
    MailboxTestUtil.initServer();
    MailboxTestUtil.clearData();
    Provisioning prov = Provisioning.getInstance();
    Map<String, Object> attrs = Maps.newHashMap();
    prov.createDomain("zimbra.com", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    attrs.put(Provisioning.A_zimbraSieveRejectMailEnabled, "TRUE");
    prov.createAccount("test@zimbra.com", "secret", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    attrs.put(Provisioning.A_zimbraSieveRejectMailEnabled, "TRUE");
    prov.createAccount("test2@zimbra.com", "secret", attrs);
    // this MailboxManager does everything except actually send mail
    MailboxManager.setInstance(new DirectInsertionMailboxManager());
}
Also used : Provisioning(com.zimbra.cs.account.Provisioning) DirectInsertionMailboxManager(com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager) BeforeClass(org.junit.BeforeClass)

Example 8 with DirectInsertionMailboxManager

use of com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager in project zm-mailbox by Zimbra.

the class ExtShareInfoTest method setUp.

/**
     * @throws java.lang.Exception
     */
@Before
public void setUp() throws Exception {
    MailboxTestUtil.initServer();
    Provisioning prov = Provisioning.getInstance();
    Map<String, Object> attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    ownerAcct = prov.createAccount("test@zimbra.com", "secret", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    attrs.put("zimbraIsExternalVirtualAccount", "TRUE");
    testAcct = prov.createAccount("rcpt@example.com", "secret", attrs);
    // this MailboxManager does everything except use SMTP to deliver mail
    MailboxManager.setInstance(new DirectInsertionMailboxManager());
}
Also used : DirectInsertionMailboxManager(com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager) Before(org.junit.Before)

Example 9 with DirectInsertionMailboxManager

use of com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager in project zm-mailbox by Zimbra.

the class EscapeSequencesTest method init.

@BeforeClass
public static void init() throws Exception {
    MailboxTestUtil.initServer();
    MailboxTestUtil.clearData();
    MockProvisioning prov = new MockProvisioning();
    Provisioning.setInstance(prov);
    Map<String, Object> attrs = Maps.newHashMap();
    attrs = Maps.newHashMap();
    prov.createDomain("zimbra.com", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    attrs.put(Provisioning.A_zimbraSieveNotifyActionRFCCompliant, "TRUE");
    Account account = prov.createAccount("test1@zimbra.com", "secret", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    attrs.put(Provisioning.A_zimbraSieveNotifyActionRFCCompliant, "TRUE");
    prov.createAccount("test2@zimbra.com", "secret", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    attrs.put(Provisioning.A_zimbraSieveNotifyActionRFCCompliant, "TRUE");
    prov.createAccount("test3@zimbra.com", "secret", attrs);
    // this MailboxManager does everything except actually send mail
    MailboxManager.setInstance(new DirectInsertionMailboxManager());
}
Also used : Account(com.zimbra.cs.account.Account) MockProvisioning(com.zimbra.cs.account.MockProvisioning) DirectInsertionMailboxManager(com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager) BeforeClass(org.junit.BeforeClass)

Example 10 with DirectInsertionMailboxManager

use of com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager in project zm-mailbox by Zimbra.

the class AddHeaderTest method init.

@BeforeClass
public static void init() throws Exception {
    MailboxTestUtil.initServer();
    MailboxTestUtil.clearData();
    Provisioning prov = Provisioning.getInstance();
    Map<String, Object> attrs = Maps.newHashMap();
    prov.createDomain("zimbra.com", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    prov.createAccount("test@zimbra.com", "secret", attrs);
    attrs = Maps.newHashMap();
    attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
    prov.createAccount("test2@zimbra.com", "secret", attrs);
    // this MailboxManager does everything except actually send mail
    MailboxManager.setInstance(new DirectInsertionMailboxManager());
}
Also used : Provisioning(com.zimbra.cs.account.Provisioning) DirectInsertionMailboxManager(com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager) BeforeClass(org.junit.BeforeClass)

Aggregations

DirectInsertionMailboxManager (com.zimbra.cs.service.mail.SendMsgTest.DirectInsertionMailboxManager)12 BeforeClass (org.junit.BeforeClass)10 Provisioning (com.zimbra.cs.account.Provisioning)8 Account (com.zimbra.cs.account.Account)4 MockProvisioning (com.zimbra.cs.account.MockProvisioning)2 Before (org.junit.Before)2 Server (com.zimbra.cs.account.Server)1