nss: upgrade to release 3.73
[LibreOffice.git] / package / qa / storages / StorageUnitTest.java
bloba8e433c3ee5f487f0144d8ad79b171ad81e4059a
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 package complex.storages;
22 import com.sun.star.lang.XMultiServiceFactory;
23 import com.sun.star.lang.XMultiComponentFactory;
24 import com.sun.star.connection.XConnector;
25 import com.sun.star.connection.XConnection;
27 import com.sun.star.bridge.XUnoUrlResolver;
28 import com.sun.star.uno.UnoRuntime;
29 import com.sun.star.uno.XInterface;
30 import com.sun.star.uno.XNamingService;
31 import com.sun.star.uno.XComponentContext;
33 import com.sun.star.container.*;
34 import com.sun.star.beans.*;
35 import com.sun.star.lang.*;
37 import complexlib.ComplexTestCase;
39 import complex.storages.*;
41 import util.utils;
42 import java.util.*;
43 import java.io.*;
45 /* This unit test for storage objects is designed to
46 * test most important statements from storage service
47 * specification.
49 * Regression tests are added to extend the tested
50 * functionalities.
52 public class StorageUnitTest extends ComplexTestCase
54 private XMultiServiceFactory m_xMSF = null;
55 private XSingleServiceFactory m_xStorageFactory = null;
57 public String[] getTestMethodNames()
59 return new String[] {
60 "ExecuteTest01",
61 "ExecuteTest02",
62 "ExecuteTest03",
63 "ExecuteTest04",
64 "ExecuteTest05",
65 "ExecuteTest06",
66 "ExecuteTest07",
67 "ExecuteTest08",
68 "ExecuteTest09",
69 "ExecuteTest10",
70 "ExecuteTest11",
71 "ExecuteTest12",
72 "ExecuteTest13",
73 "ExecuteTest14",
74 "ExecuteTest15",
75 "ExecuteTest16",
76 "ExecuteTest17",
77 "ExecuteTest18",
78 "ExecuteRegressionTest_114358",
79 "ExecuteRegressionTest_i29169",
80 "ExecuteRegressionTest_i30400",
81 "ExecuteRegressionTest_i29321",
82 "ExecuteRegressionTest_i30677",
83 "ExecuteRegressionTest_i27773",
84 "ExecuteRegressionTest_i46848",
85 "ExecuteRegressionTest_i55821",
86 "ExecuteRegressionTest_i35095",
87 "ExecuteRegressionTest_i49755",
88 "ExecuteRegressionTest_i59886",
89 "ExecuteRegressionTest_i61909",
90 "ExecuteRegressionTest_i84234",
91 "ExecuteRegressionTest_125919"
95 public String getTestObjectName()
97 return "StorageUnitTest";
100 public void before()
102 m_xMSF = (XMultiServiceFactory)param.getMSF();
103 if ( m_xMSF == null )
105 failed( "Can't create service factory!" );
106 return;
109 try {
110 Object oStorageFactory = m_xMSF.createInstance( "com.sun.star.embed.StorageFactory" );
111 m_xStorageFactory = (XSingleServiceFactory)UnoRuntime.queryInterface( XSingleServiceFactory.class,
112 oStorageFactory );
114 catch( Exception e )
116 failed( "Can't create storage factory!" );
117 return;
120 if ( m_xStorageFactory == null )
122 failed( "Can't create service factory!" );
123 return;
127 public void ExecuteTest01()
129 StorageTest aTest = new Test01( m_xMSF, m_xStorageFactory, log );
130 assure( "Test01 failed!", aTest.test() );
133 public void ExecuteTest02()
135 StorageTest aTest = new Test02( m_xMSF, m_xStorageFactory, log );
136 assure( "Test02 failed!", aTest.test() );
139 public void ExecuteTest03()
141 StorageTest aTest = new Test03( m_xMSF, m_xStorageFactory, log );
142 assure( "Test03 failed!", aTest.test() );
145 public void ExecuteTest04()
147 StorageTest aTest = new Test04( m_xMSF, m_xStorageFactory, log );
148 assure( "Test04 failed!", aTest.test() );
151 public void ExecuteTest05()
153 StorageTest aTest = new Test05( m_xMSF, m_xStorageFactory, log );
154 assure( "Test05 failed!", aTest.test() );
157 public void ExecuteTest06()
159 StorageTest aTest = new Test06( m_xMSF, m_xStorageFactory, log );
160 assure( "Test06 failed!", aTest.test() );
163 public void ExecuteTest07()
165 StorageTest aTest = new Test07( m_xMSF, m_xStorageFactory, log );
166 assure( "Test07 failed!", aTest.test() );
169 public void ExecuteTest08()
171 StorageTest aTest = new Test08( m_xMSF, m_xStorageFactory, log );
172 assure( "Test08 failed!", aTest.test() );
175 public void ExecuteTest09()
177 StorageTest aTest = new Test09( m_xMSF, m_xStorageFactory, log );
178 assure( "Test09 failed!", aTest.test() );
181 public void ExecuteTest10()
183 StorageTest aTest = new Test10( m_xMSF, m_xStorageFactory, log );
184 assure( "Test10 failed!", aTest.test() );
187 public void ExecuteTest11()
189 StorageTest aTest = new Test11( m_xMSF, m_xStorageFactory, log );
190 assure( "Test11 failed!", aTest.test() );
193 public void ExecuteTest12()
195 StorageTest aTest = new Test12( m_xMSF, m_xStorageFactory, log );
196 assure( "Test12 failed!", aTest.test() );
199 public void ExecuteTest13()
201 StorageTest aTest = new Test13( m_xMSF, m_xStorageFactory, log );
202 assure( "Test13 failed!", aTest.test() );
205 public void ExecuteTest14()
207 StorageTest aTest = new Test14( m_xMSF, m_xStorageFactory, log );
208 assure( "Test14 failed!", aTest.test() );
211 public void ExecuteTest15()
213 StorageTest aTest = new Test15( m_xMSF, m_xStorageFactory, log );
214 assure( "Test15 failed!", aTest.test() );
217 public void ExecuteTest16()
219 StorageTest aTest = new Test16( m_xMSF, m_xStorageFactory, log );
220 assure( "Test16 failed!", aTest.test() );
223 public void ExecuteTest17()
225 StorageTest aTest = new Test17( m_xMSF, m_xStorageFactory, log );
226 assure( "Test17 failed!", aTest.test() );
229 public void ExecuteTest18()
231 StorageTest aTest = new Test18( m_xMSF, m_xStorageFactory, log );
232 assure( "Test18 failed!", aTest.test() );
235 public void ExecuteRegressionTest_114358()
237 StorageTest aTest = new RegressionTest_114358( m_xMSF, m_xStorageFactory, log );
238 assure( "RegressionTest_114358 failed!", aTest.test() );
241 public void ExecuteRegressionTest_i29169()
243 StorageTest aTest = new RegressionTest_i29169( m_xMSF, m_xStorageFactory, log );
244 assure( "RegressionTest_i29169 failed!", aTest.test() );
247 public void ExecuteRegressionTest_i30400()
249 StorageTest aTest = new RegressionTest_i30400( m_xMSF, m_xStorageFactory, log );
250 assure( "RegressionTest_i30400 failed!", aTest.test() );
253 public void ExecuteRegressionTest_i29321()
255 StorageTest aTest = new RegressionTest_i29321( m_xMSF, m_xStorageFactory, log );
256 assure( "RegressionTest_i29321 failed!", aTest.test() );
259 public void ExecuteRegressionTest_i30677()
261 StorageTest aTest = new RegressionTest_i30677( m_xMSF, m_xStorageFactory, log );
262 assure( "RegressionTest_i30677 failed!", aTest.test() );
265 public void ExecuteRegressionTest_i27773()
267 StorageTest aTest = new RegressionTest_i27773( m_xMSF, m_xStorageFactory, log );
268 assure( "RegressionTest_i27773 failed!", aTest.test() );
271 public void ExecuteRegressionTest_i46848()
273 StorageTest aTest = new RegressionTest_i46848( m_xMSF, m_xStorageFactory, log );
274 assure( "RegressionTest_i46848 failed!", aTest.test() );
277 public void ExecuteRegressionTest_i55821()
279 StorageTest aTest = new RegressionTest_i55821( m_xMSF, m_xStorageFactory, log );
280 assure( "RegressionTest_i55821 failed!", aTest.test() );
283 public void ExecuteRegressionTest_i35095()
285 StorageTest aTest = new RegressionTest_i35095( m_xMSF, m_xStorageFactory, log );
286 assure( "RegressionTest_i35095 failed!", aTest.test() );
289 public void ExecuteRegressionTest_i49755()
291 StorageTest aTest = new RegressionTest_i49755( m_xMSF, m_xStorageFactory, log );
292 assure( "RegressionTest_i49755 failed!", aTest.test() );
295 public void ExecuteRegressionTest_i59886()
297 StorageTest aTest = new RegressionTest_i59886( m_xMSF, m_xStorageFactory, log );
298 assure( "RegressionTest_i59886 failed!", aTest.test() );
301 public void ExecuteRegressionTest_i61909()
303 StorageTest aTest = new RegressionTest_i61909( m_xMSF, m_xStorageFactory, log );
304 assure( "RegressionTest_i61909 failed!", aTest.test() );
307 public void ExecuteRegressionTest_i84234()
309 StorageTest aTest = new RegressionTest_i84234( m_xMSF, m_xStorageFactory, log );
310 assure( "RegressionTest_i84234 failed!", aTest.test() );
313 public void ExecuteRegressionTest_125919()
315 StorageTest aTest = new RegressionTest_125919( m_xMSF, m_xStorageFactory, log );
316 assure( "RegressionTest_125919 failed!", aTest.test() );