merge the formfield patch from ooo-build
[ooovba.git] / qadevOOo / tests / java / mod / _sysmgr1 / SystemIntegration.java
blobcf8416328dda4f7cb90e38c8918bfe2f1291ab6e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SystemIntegration.java,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 package mod._sysmgr1;
33 import com.sun.star.lang.XInitialization;
34 import com.sun.star.lang.XMultiServiceFactory;
35 import com.sun.star.uno.UnoRuntime;
36 import com.sun.star.uno.XInterface;
37 import java.io.PrintWriter;
38 import lib.TestCase;
39 import lib.TestEnvironment;
40 import lib.TestParameters;
42 public class SystemIntegration extends TestCase {
44 protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) {
45 XInterface oObj = null;
46 Object[] args = new Object[0];
48 try {
50 oObj = (XInterface) ((XMultiServiceFactory)tParam.getMSF())
51 .createInstance("com.sun.star.comp.configuration.backend.SystemIntegration");
52 XInitialization xInit = (XInitialization) UnoRuntime.queryInterface(XInitialization.class,oObj);
53 xInit.initialize(args);
55 } catch (com.sun.star.uno.Exception e) {
58 log.println("Implementation name: "+ util.utils.getImplName(oObj));
60 TestEnvironment tEnv = new TestEnvironment(oObj);
62 //objRelation for XBackend
63 tEnv.addObjRelation("noUpdate", "SystemIntegrationManager: No Update Operation allowed, Read Only access -- OK");
65 return tEnv;