use of com.zimbra.cs.account.Provisioning in project zm-mailbox by Zimbra.
the class GetMsgTest method setUp.
/**
* @throws java.lang.Exception
*/
@Before
public void setUp() 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 MailboxManager() {
@Override
protected Mailbox instantiateMailbox(MailboxData data) {
return new Mailbox(data) {
@Override
public MailSender getMailSender() {
return new MailSender() {
@Override
protected Collection<Address> sendMessage(Mailbox mbox, MimeMessage mm, Collection<RollbackData> rollbacks) {
try {
return Arrays.asList(getRecipients(mm));
} catch (Exception e) {
return Collections.emptyList();
}
}
};
}
};
}
});
}
use of com.zimbra.cs.account.Provisioning in project zm-mailbox by Zimbra.
the class ItemActionTest method init.
@BeforeClass
public static void init() throws Exception {
MailboxTestUtil.initServer();
Provisioning prov = Provisioning.getInstance();
prov.createAccount("test@zimbra.com", "secret", Maps.<String, Object>newHashMap());
Map<String, Object> attrs = Maps.newHashMap();
attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
prov.createAccount("test2@zimbra.com", "secret", attrs);
}
use of com.zimbra.cs.account.Provisioning in project zm-mailbox by Zimbra.
the class GetFolderTest method init.
@BeforeClass
public static void init() throws Exception {
MailboxTestUtil.initServer();
Provisioning prov = Provisioning.getInstance();
Map<String, Object> attrs = Maps.newHashMap();
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);
}
use of com.zimbra.cs.account.Provisioning in project zm-mailbox by Zimbra.
the class GetFilterRulesTest method init.
@BeforeClass
public static void init() throws Exception {
MailboxTestUtil.initServer();
Provisioning prov = Provisioning.getInstance();
Map<String, Object> attrs = Maps.newHashMap();
prov.createAccount("test@zimbra.com", "secret", attrs);
}
use of com.zimbra.cs.account.Provisioning in project zm-mailbox by Zimbra.
the class TagActionTest method init.
@BeforeClass
public static void init() throws Exception {
MailboxTestUtil.initServer();
Provisioning prov = Provisioning.getInstance();
prov.createAccount("test@zimbra.com", "secret", Maps.<String, Object>newHashMap());
Map<String, Object> attrs = Maps.newHashMap();
attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
prov.createAccount("test2@zimbra.com", "secret", attrs);
}
Aggregations