Search in sources :

Example 1 with ZAppointmentResult

use of com.zimbra.client.ZMailbox.ZAppointmentResult in project zm-mailbox by Zimbra.

the class TestSearchTask method init.

@BeforeClass
public static void init() throws ServiceException {
    TestUtil.deleteAccountIfExists(USER_NAME);
    TestUtil.createAccount(USER_NAME);
    mbox = TestUtil.getZMailbox(USER_NAME);
    for (int i = 0; i < numTasks; i++) {
        ZOutgoingMessage msg = TestUtil.getOutgoingMessage(USER_NAME, null, String.format("task body %d", i), null);
        ZInvite inv = new ZInvite();
        ZInvite.ZComponent comp = new ZComponent();
        comp.setIsAllDay(true);
        comp.setStatus(ZStatus.NEED);
        comp.setLocation("mount erebor");
        comp.setPercentCompleted("0");
        comp.setPriority("0");
        comp.setName(String.format("destroy the one ring %d", i));
        comp.setOrganizer(new ZOrganizer(mbox.getName()));
        inv.getComponents().add(comp);
        ZAppointmentResult resp = mbox.createTask("15", null, msg, inv, null);
        ids.add(resp.getInviteId());
    }
}
Also used : ZComponent(com.zimbra.client.ZInvite.ZComponent) ZOutgoingMessage(com.zimbra.client.ZMailbox.ZOutgoingMessage) ZInvite(com.zimbra.client.ZInvite) ZAppointmentResult(com.zimbra.client.ZMailbox.ZAppointmentResult) ZOrganizer(com.zimbra.client.ZInvite.ZOrganizer) ZComponent(com.zimbra.client.ZInvite.ZComponent) BeforeClass(org.junit.BeforeClass)

Aggregations

ZInvite (com.zimbra.client.ZInvite)1 ZComponent (com.zimbra.client.ZInvite.ZComponent)1 ZOrganizer (com.zimbra.client.ZInvite.ZOrganizer)1 ZAppointmentResult (com.zimbra.client.ZMailbox.ZAppointmentResult)1 ZOutgoingMessage (com.zimbra.client.ZMailbox.ZOutgoingMessage)1 BeforeClass (org.junit.BeforeClass)1