use of com.zimbra.cs.account.MockProvisioning in project zm-mailbox by Zimbra.
the class MimeHandlerManagerTest method init.
@BeforeClass
public static void init() throws Exception {
MailboxTestUtil.initServer();
MockProvisioning prov = new MockProvisioning();
prov.clearMimeHandlers();
MockMimeTypeInfo mime = new MockMimeTypeInfo();
mime.setMimeTypes("text/html");
mime.setFileExtensions("html", "htm");
mime.setHandlerClass(TextHtmlHandler.class.getName());
prov.addMimeType("text/html", mime);
mime = new MockMimeTypeInfo();
mime.setMimeTypes("text/enriched");
mime.setFileExtensions("txe");
mime.setHandlerClass(TextEnrichedHandler.class.getName());
prov.addMimeType("text/enriched", mime);
mime = new MockMimeTypeInfo();
mime.setHandlerClass(UnknownTypeHandler.class.getName());
prov.addMimeType("all", mime);
mime = new MockMimeTypeInfo();
mime.setMimeTypes("not/exist");
mime.setFileExtensions("NotExist");
mime.setHandlerClass("com.zimbra.cs.mime.handler.NotExist");
prov.addMimeType("not/exist", mime);
Provisioning.setInstance(prov);
}
use of com.zimbra.cs.account.MockProvisioning in project zm-mailbox by Zimbra.
the class AclPushTest method init.
@BeforeClass
public static void init() throws Exception {
Provisioning.setInstance(new MockProvisioning());
LC.zimbra_class_database.setDefault(HSQLDB.class.getName());
DbPool.startup();
HSQLDB.createDatabase();
MailboxTestUtil.initServer();
Provisioning prov = Provisioning.getInstance();
HashMap<String, Object> attrs = new HashMap<String, Object>();
attrs.put(Provisioning.A_zimbraId, "17dd075e-2b47-44e6-8cb8-7fdfa18c1a9f");
prov.createAccount("owner@zimbra.com", "secret", attrs);
attrs = new HashMap<String, Object>();
attrs.put(Provisioning.A_zimbraId, "a4e41fbe-9c3e-4ab5-8b34-c42f17e251cd");
prov.createAccount("principal@zimbra.com", "secret", attrs);
ScheduledTaskManager.startup();
}
use of com.zimbra.cs.account.MockProvisioning in project zm-mailbox by Zimbra.
the class SizeQueryTest method init.
@BeforeClass
public static void init() throws Exception {
MailboxTestUtil.initServer();
MockProvisioning prov = new MockProvisioning();
prov.createAccount("zero@zimbra.com", "secret", new HashMap<String, Object>());
Provisioning.setInstance(prov);
}
use of com.zimbra.cs.account.MockProvisioning in project zm-mailbox by Zimbra.
the class ItemQueryTest method setUp.
@Before
public void setUp() throws Exception {
System.out.println(testName.getMethodName());
MockProvisioning prov = new MockProvisioning();
prov.createAccount("zero@zimbra.com", "secret", new HashMap<String, Object>());
Provisioning.setInstance(prov);
}
use of com.zimbra.cs.account.MockProvisioning in project zm-mailbox by Zimbra.
the class ModifyDataSourceTest method init.
@BeforeClass
public static void init() throws Exception {
MailboxTestUtil.initServer();
MockProvisioning prov = new MockProvisioning();
Provisioning.setInstance(prov);
Map<String, Object> attrs = Maps.newHashMap();
prov.createDomain("zimbra.com", attrs);
attrs = Maps.newHashMap();
prov.createAccount("test@zimbra.com", "secret", attrs);
}
Aggregations