@BeforeClass public static void init() throws Exception { MailboxTestUtil.initServer(); Provisioning prov = Provisioning.getInstance(); prov.createAccount("*****@*****.**", "secret", new HashMap<String, Object>()); Provisioning.setInstance(prov); }
@BeforeClass public static void init() throws Exception { MailboxTestUtil .initServer(); // TODO: allow paths to be specified so we can run tests outside of // ZimbraServer MailboxManager.setInstance( new MailboxManager() { @Override protected Mailbox instantiateMailbox(MailboxData data) { // mock the behaviors we need to test in DesktopMailbox return new Mailbox(data) { @Override protected boolean needRedo(OperationContext octxt, RedoableOp recorder) { return false; } }; } // TODO: eventually move this into ZimbraOffline and implement all of the provisioning // needed for real DesktopMailbox // try { // return new DesktopMailbox(data) { // }; // } catch (ServiceException e) { // throw new RuntimeException(e); // } }); Provisioning prov = Provisioning.getInstance(); prov.createAccount("*****@*****.**", "secret", new HashMap<String, Object>()); }