Update ooo320-m1
[ooovba.git] / package / qa / storages / StorageUnitTest.java
blobfa0638cfcc6f7a741018078458dbec3764ec268b
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: StorageUnitTest.java,v $
10 * $Revision: 1.12 $
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 ************************************************************************/
30 package complex.storages;
32 import com.sun.star.lang.XMultiServiceFactory;
33 import com.sun.star.lang.XMultiComponentFactory;
34 import com.sun.star.connection.XConnector;
35 import com.sun.star.connection.XConnection;
37 import com.sun.star.bridge.XUnoUrlResolver;
38 import com.sun.star.uno.UnoRuntime;
39 import com.sun.star.uno.XInterface;
40 import com.sun.star.uno.XNamingService;
41 import com.sun.star.uno.XComponentContext;
43 import com.sun.star.container.*;
44 import com.sun.star.beans.*;
45 import com.sun.star.lang.*;
47 import complexlib.ComplexTestCase;
49 import complex.storages.*;
51 import util.utils;
52 import java.util.*;
53 import java.io.*;
55 /* This unit test for storage objects is designed to
56 * test most important statements from storage service
57 * specification.
59 * Regression tests are added to extend the tested
60 * functionalities.
62 public class StorageUnitTest extends ComplexTestCase
64 private XMultiServiceFactory m_xMSF = null;
65 private XSingleServiceFactory m_xStorageFactory = null;
67 public String[] getTestMethodNames()
69 return new String[] {
70 "ExecuteTest01",
71 "ExecuteTest02",
72 "ExecuteTest03",
73 "ExecuteTest04",
74 "ExecuteTest05",
75 "ExecuteTest06",
76 "ExecuteTest07",
77 "ExecuteTest08",
78 "ExecuteTest09",
79 "ExecuteTest10",
80 "ExecuteTest11",
81 "ExecuteTest12",
82 "ExecuteTest13",
83 "ExecuteTest14",
84 "ExecuteTest15",
85 "ExecuteTest16",
86 "ExecuteTest17",
87 "ExecuteTest18",
88 "ExecuteRegressionTest_114358",
89 "ExecuteRegressionTest_i29169",
90 "ExecuteRegressionTest_i30400",
91 "ExecuteRegressionTest_i29321",
92 "ExecuteRegressionTest_i30677",
93 "ExecuteRegressionTest_i27773",
94 "ExecuteRegressionTest_i46848",
95 "ExecuteRegressionTest_i55821",
96 "ExecuteRegressionTest_i35095",
97 "ExecuteRegressionTest_i49755",
98 "ExecuteRegressionTest_i59886",
99 "ExecuteRegressionTest_i61909",
100 "ExecuteRegressionTest_i84234",
101 "ExecuteRegressionTest_125919"
105 public String getTestObjectName()
107 return "StorageUnitTest";
110 public void before()
112 m_xMSF = (XMultiServiceFactory)param.getMSF();
113 if ( m_xMSF == null )
115 failed( "Can't create service factory!" );
116 return;
119 try {
120 Object oStorageFactory = m_xMSF.createInstance( "com.sun.star.embed.StorageFactory" );
121 m_xStorageFactory = (XSingleServiceFactory)UnoRuntime.queryInterface( XSingleServiceFactory.class,
122 oStorageFactory );
124 catch( Exception e )
126 failed( "Can't create storage factory!" );
127 return;
130 if ( m_xStorageFactory == null )
132 failed( "Can't create service factory!" );
133 return;
137 public void ExecuteTest01()
139 StorageTest aTest = new Test01( m_xMSF, m_xStorageFactory, log );
140 assure( "Test01 failed!", aTest.test() );
143 public void ExecuteTest02()
145 StorageTest aTest = new Test02( m_xMSF, m_xStorageFactory, log );
146 assure( "Test02 failed!", aTest.test() );
149 public void ExecuteTest03()
151 StorageTest aTest = new Test03( m_xMSF, m_xStorageFactory, log );
152 assure( "Test03 failed!", aTest.test() );
155 public void ExecuteTest04()
157 StorageTest aTest = new Test04( m_xMSF, m_xStorageFactory, log );
158 assure( "Test04 failed!", aTest.test() );
161 public void ExecuteTest05()
163 StorageTest aTest = new Test05( m_xMSF, m_xStorageFactory, log );
164 assure( "Test05 failed!", aTest.test() );
167 public void ExecuteTest06()
169 StorageTest aTest = new Test06( m_xMSF, m_xStorageFactory, log );
170 assure( "Test06 failed!", aTest.test() );
173 public void ExecuteTest07()
175 StorageTest aTest = new Test07( m_xMSF, m_xStorageFactory, log );
176 assure( "Test07 failed!", aTest.test() );
179 public void ExecuteTest08()
181 StorageTest aTest = new Test08( m_xMSF, m_xStorageFactory, log );
182 assure( "Test08 failed!", aTest.test() );
185 public void ExecuteTest09()
187 StorageTest aTest = new Test09( m_xMSF, m_xStorageFactory, log );
188 assure( "Test09 failed!", aTest.test() );
191 public void ExecuteTest10()
193 StorageTest aTest = new Test10( m_xMSF, m_xStorageFactory, log );
194 assure( "Test10 failed!", aTest.test() );
197 public void ExecuteTest11()
199 StorageTest aTest = new Test11( m_xMSF, m_xStorageFactory, log );
200 assure( "Test11 failed!", aTest.test() );
203 public void ExecuteTest12()
205 StorageTest aTest = new Test12( m_xMSF, m_xStorageFactory, log );
206 assure( "Test12 failed!", aTest.test() );
209 public void ExecuteTest13()
211 StorageTest aTest = new Test13( m_xMSF, m_xStorageFactory, log );
212 assure( "Test13 failed!", aTest.test() );
215 public void ExecuteTest14()
217 StorageTest aTest = new Test14( m_xMSF, m_xStorageFactory, log );
218 assure( "Test14 failed!", aTest.test() );
221 public void ExecuteTest15()
223 StorageTest aTest = new Test15( m_xMSF, m_xStorageFactory, log );
224 assure( "Test15 failed!", aTest.test() );
227 public void ExecuteTest16()
229 StorageTest aTest = new Test16( m_xMSF, m_xStorageFactory, log );
230 assure( "Test16 failed!", aTest.test() );
233 public void ExecuteTest17()
235 StorageTest aTest = new Test17( m_xMSF, m_xStorageFactory, log );
236 assure( "Test17 failed!", aTest.test() );
239 public void ExecuteTest18()
241 StorageTest aTest = new Test18( m_xMSF, m_xStorageFactory, log );
242 assure( "Test18 failed!", aTest.test() );
245 public void ExecuteRegressionTest_114358()
247 StorageTest aTest = new RegressionTest_114358( m_xMSF, m_xStorageFactory, log );
248 assure( "RegressionTest_114358 failed!", aTest.test() );
251 public void ExecuteRegressionTest_i29169()
253 StorageTest aTest = new RegressionTest_i29169( m_xMSF, m_xStorageFactory, log );
254 assure( "RegressionTest_i29169 failed!", aTest.test() );
257 public void ExecuteRegressionTest_i30400()
259 StorageTest aTest = new RegressionTest_i30400( m_xMSF, m_xStorageFactory, log );
260 assure( "RegressionTest_i30400 failed!", aTest.test() );
263 public void ExecuteRegressionTest_i29321()
265 StorageTest aTest = new RegressionTest_i29321( m_xMSF, m_xStorageFactory, log );
266 assure( "RegressionTest_i29321 failed!", aTest.test() );
269 public void ExecuteRegressionTest_i30677()
271 StorageTest aTest = new RegressionTest_i30677( m_xMSF, m_xStorageFactory, log );
272 assure( "RegressionTest_i30677 failed!", aTest.test() );
275 public void ExecuteRegressionTest_i27773()
277 StorageTest aTest = new RegressionTest_i27773( m_xMSF, m_xStorageFactory, log );
278 assure( "RegressionTest_i27773 failed!", aTest.test() );
281 public void ExecuteRegressionTest_i46848()
283 StorageTest aTest = new RegressionTest_i46848( m_xMSF, m_xStorageFactory, log );
284 assure( "RegressionTest_i46848 failed!", aTest.test() );
287 public void ExecuteRegressionTest_i55821()
289 StorageTest aTest = new RegressionTest_i55821( m_xMSF, m_xStorageFactory, log );
290 assure( "RegressionTest_i55821 failed!", aTest.test() );
293 public void ExecuteRegressionTest_i35095()
295 StorageTest aTest = new RegressionTest_i35095( m_xMSF, m_xStorageFactory, log );
296 assure( "RegressionTest_i35095 failed!", aTest.test() );
299 public void ExecuteRegressionTest_i49755()
301 StorageTest aTest = new RegressionTest_i49755( m_xMSF, m_xStorageFactory, log );
302 assure( "RegressionTest_i49755 failed!", aTest.test() );
305 public void ExecuteRegressionTest_i59886()
307 StorageTest aTest = new RegressionTest_i59886( m_xMSF, m_xStorageFactory, log );
308 assure( "RegressionTest_i59886 failed!", aTest.test() );
311 public void ExecuteRegressionTest_i61909()
313 StorageTest aTest = new RegressionTest_i61909( m_xMSF, m_xStorageFactory, log );
314 assure( "RegressionTest_i61909 failed!", aTest.test() );
317 public void ExecuteRegressionTest_i84234()
319 StorageTest aTest = new RegressionTest_i84234( m_xMSF, m_xStorageFactory, log );
320 assure( "RegressionTest_i84234 failed!", aTest.test() );
323 public void ExecuteRegressionTest_125919()
325 StorageTest aTest = new RegressionTest_125919( m_xMSF, m_xStorageFactory, log );
326 assure( "RegressionTest_125919 failed!", aTest.test() );