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 .
18 package complex
.ofopxmlstorages
;
20 import com
.sun
.star
.lang
.XMultiServiceFactory
;
21 import com
.sun
.star
.lang
.XMultiComponentFactory
;
22 import com
.sun
.star
.connection
.XConnector
;
23 import com
.sun
.star
.connection
.XConnection
;
25 import com
.sun
.star
.bridge
.XUnoUrlResolver
;
26 import com
.sun
.star
.uno
.UnoRuntime
;
27 import com
.sun
.star
.uno
.XInterface
;
28 import com
.sun
.star
.uno
.XNamingService
;
29 import com
.sun
.star
.uno
.XComponentContext
;
31 import com
.sun
.star
.container
.*;
32 import com
.sun
.star
.beans
.*;
33 import com
.sun
.star
.lang
.*;
35 import complexlib
.ComplexTestCase
;
37 import complex
.ofopxmlstorages
.*;
43 /* This unit test for storage objects is designed to
44 * test most important statements from storage service
47 * Regression tests are added to extend the tested
50 public class StorageUnitTest
extends ComplexTestCase
52 private XMultiServiceFactory m_xMSF
= null;
53 private XSingleServiceFactory m_xStorageFactory
= null;
55 public String
[] getTestMethodNames()
69 public String
getTestObjectName()
71 return "StorageUnitTest";
76 m_xMSF
= (XMultiServiceFactory
)param
.getMSF();
79 failed( "Can't create service factory!" );
84 Object oStorageFactory
= m_xMSF
.createInstance( "com.sun.star.embed.StorageFactory" );
85 m_xStorageFactory
= (XSingleServiceFactory
)UnoRuntime
.queryInterface( XSingleServiceFactory
.class,
90 failed( "Can't create storage factory!" );
94 if ( m_xStorageFactory
== null )
96 failed( "Can't create service factory!" );
101 public void ExecuteTest01()
103 StorageTest aTest
= new Test01( m_xMSF
, m_xStorageFactory
, log
);
104 assure( "Test01 failed!", aTest
.test() );
107 public void ExecuteTest02()
109 StorageTest aTest
= new Test02( m_xMSF
, m_xStorageFactory
, log
);
110 assure( "Test02 failed!", aTest
.test() );
113 public void ExecuteTest03()
115 StorageTest aTest
= new Test03( m_xMSF
, m_xStorageFactory
, log
);
116 assure( "Test03 failed!", aTest
.test() );
119 public void ExecuteTest04()
121 StorageTest aTest
= new Test04( m_xMSF
, m_xStorageFactory
, log
);
122 assure( "Test04 failed!", aTest
.test() );
125 public void ExecuteTest05()
127 StorageTest aTest
= new Test05( m_xMSF
, m_xStorageFactory
, log
);
128 assure( "Test05 failed!", aTest
.test() );
131 public void ExecuteTest06()
133 StorageTest aTest
= new Test06( m_xMSF
, m_xStorageFactory
, log
);
134 assure( "Test06 failed!", aTest
.test() );
137 public void ExecuteTest07()
139 StorageTest aTest
= new Test07( m_xMSF
, m_xStorageFactory
, log
);
140 assure( "Test07 failed!", aTest
.test() );
143 public void ExecuteTest08()
145 StorageTest aTest
= new Test08( m_xMSF
, m_xStorageFactory
, log
);
146 assure( "Test08 failed!", aTest
.test() );