Update ooo320-m1
[ooovba.git] / svtools / qa / complex / ConfigItems / CheckConfigItems.java
blobc0e9a8a828c1afdaa61cc1a3d58f94029a532d88
1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
5 * $RCSfile: CheckConfigItems.java,v $
7 * $Revision: 1.1.4.2 $
9 * last change: $Author: as $ $Date: 2008/03/19 11:09:22 $
11 * The Contents of this file are made available subject to
12 * the terms of GNU Lesser General Public License Version 2.1.
15 * GNU Lesser General Public License Version 2.1
16 * =============================================
17 * Copyright 2005 by Sun Microsystems, Inc.
18 * 901 San Antonio Road, Palo Alto, CA 94303, USA
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License version 2.1, as published by the Free Software Foundation.
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 * MA 02111-1307 USA
34 ************************************************************************/
36 package complex.ConfigItems;
38 import com.sun.star.beans.*;
39 import com.sun.star.lang.*;
40 import com.sun.star.uno.*;
41 import com.sun.star.task.*;
43 import complexlib.*;
45 import java.lang.*;
46 import java.util.*;
48 //-----------------------------------------------
49 /** @short todo document me
51 public class CheckConfigItems extends ComplexTestCase
53 //-------------------------------------------
54 // some const
56 //-------------------------------------------
57 // member
59 /** points to the global uno service manager. */
60 private XMultiServiceFactory m_xSmgr = null;
62 /** implements real config item tests in C++. */
63 private XJob m_xTest = null;
65 //-------------------------------------------
66 // test environment
68 //-------------------------------------------
69 /** @short A function to tell the framework,
70 which test functions are available.
72 @return All test methods.
73 @todo Think about selection of tests from outside ...
75 public String[] getTestMethodNames()
77 return new String[]
79 "checkPicklist",
80 "checkURLHistory",
81 "checkHelpBookmarks",
82 "checkPrintOptions",
83 "checkAccessibilityOptions",
84 "checkUserOptions"
88 //-------------------------------------------
89 /** @short Create the environment for following tests.
91 @descr Use either a component loader from desktop or
92 from frame
94 public void before()
95 throws java.lang.Exception
97 // get uno service manager from global test environment
98 m_xSmgr = (XMultiServiceFactory)param.getMSF();
100 // TODO register helper service
102 // create module manager
103 m_xTest = (XJob)UnoRuntime.queryInterface(
104 XJob.class,
105 m_xSmgr.createInstance("com.sun.star.comp.svtools.ConfigItemTest"));
108 //-------------------------------------------
109 /** @short close the environment.
111 public void after()
112 throws java.lang.Exception
114 // TODO deregister helper service
116 m_xTest = null;
117 m_xSmgr = null;
120 //-------------------------------------------
121 /** @todo document me
123 public void checkPicklist()
124 throws java.lang.Exception
126 impl_triggerTest("checkPicklist");
129 //-------------------------------------------
130 /** @todo document me
132 public void checkURLHistory()
133 throws java.lang.Exception
135 impl_triggerTest("checkURLHistory");
138 //-------------------------------------------
139 /** @todo document me
141 public void checkHelpBookmarks()
142 throws java.lang.Exception
144 impl_triggerTest("checkHelpBookmarks");
147 //-------------------------------------------
148 /** @todo document me
150 public void checkPrintOptions()
151 throws java.lang.Exception
153 impl_triggerTest("checkPrintOptions");
156 //-------------------------------------------
157 /** @todo document me
159 public void checkAccessibilityOptions()
160 throws java.lang.Exception
162 impl_triggerTest("checkAccessibilityOptions");
165 //-------------------------------------------
166 /** @todo document me
168 public void checkUserOptions()
169 throws java.lang.Exception
171 impl_triggerTest("checkUserOptions");
174 //-------------------------------------------
175 /** @todo document me
177 private void impl_triggerTest(String sTest)
178 throws java.lang.Exception
180 NamedValue[] lArgs = new NamedValue[1];
181 lArgs[0] = new NamedValue();
182 lArgs[0].Name = "Test";
183 lArgs[0].Value = sTest;
184 m_xTest.execute(lArgs);