1113d1ee9SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3113d1ee9SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4113d1ee9SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5113d1ee9SAndrew Rist  * distributed with this work for additional information
6113d1ee9SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7113d1ee9SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8113d1ee9SAndrew Rist  * "License"); you may not use this file except in compliance
9113d1ee9SAndrew Rist  * with the License.  You may obtain a copy of the License at
10113d1ee9SAndrew Rist  *
11113d1ee9SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12113d1ee9SAndrew Rist  *
13113d1ee9SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14113d1ee9SAndrew Rist  * software distributed under the License is distributed on an
15113d1ee9SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16113d1ee9SAndrew Rist  * KIND, either express or implied.  See the License for the
17113d1ee9SAndrew Rist  * specific language governing permissions and limitations
18113d1ee9SAndrew Rist  * under the License.
19113d1ee9SAndrew Rist  *
20113d1ee9SAndrew Rist  *************************************************************/
21113d1ee9SAndrew Rist 
22113d1ee9SAndrew Rist 
23cdf0e10cSrcweir package complex.embedding;
24cdf0e10cSrcweir 
25cdf0e10cSrcweir import com.sun.star.lang.XMultiServiceFactory;
26cdf0e10cSrcweir import com.sun.star.lang.XMultiComponentFactory;
27cdf0e10cSrcweir import com.sun.star.connection.XConnector;
28cdf0e10cSrcweir import com.sun.star.connection.XConnection;
29cdf0e10cSrcweir 
30cdf0e10cSrcweir import com.sun.star.bridge.XUnoUrlResolver;
31cdf0e10cSrcweir import com.sun.star.uno.UnoRuntime;
32cdf0e10cSrcweir import com.sun.star.uno.XInterface;
33cdf0e10cSrcweir import com.sun.star.uno.XNamingService;
34cdf0e10cSrcweir import com.sun.star.uno.XComponentContext;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir import com.sun.star.container.*;
37cdf0e10cSrcweir import com.sun.star.beans.*;
38cdf0e10cSrcweir import com.sun.star.lang.*;
39cdf0e10cSrcweir 
40cdf0e10cSrcweir import complex.embedding.*;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir import java.util.*;
43cdf0e10cSrcweir import java.io.*;
44cdf0e10cSrcweir 
4505ff6674SDamjan Jovanovic import org.junit.After;
4605ff6674SDamjan Jovanovic import org.junit.AfterClass;
4705ff6674SDamjan Jovanovic import org.junit.Before;
4805ff6674SDamjan Jovanovic import org.junit.BeforeClass;
4905ff6674SDamjan Jovanovic import org.junit.Test;
5005ff6674SDamjan Jovanovic import static org.junit.Assert.*;
5105ff6674SDamjan Jovanovic import org.openoffice.test.OfficeConnection;
5205ff6674SDamjan Jovanovic 
53cdf0e10cSrcweir /* This unit test for storage objects is designed to
54cdf0e10cSrcweir  * test most important statements from storage service
55cdf0e10cSrcweir  * specification.
56cdf0e10cSrcweir  *
57cdf0e10cSrcweir  * Regression tests are added to extend the tested
58cdf0e10cSrcweir  * functionalities.
59cdf0e10cSrcweir  */
6005ff6674SDamjan Jovanovic public class EmbeddingUnitTest
61cdf0e10cSrcweir {
6205ff6674SDamjan Jovanovic     private static final OfficeConnection connection = new OfficeConnection();
63cdf0e10cSrcweir 
6405ff6674SDamjan Jovanovic     @BeforeClass
beforeClass()6505ff6674SDamjan Jovanovic     public static void beforeClass() throws Exception
6605ff6674SDamjan Jovanovic     {
6705ff6674SDamjan Jovanovic         connection.setUp();
68cdf0e10cSrcweir     }
69cdf0e10cSrcweir 
7005ff6674SDamjan Jovanovic     @AfterClass
afterClass()7105ff6674SDamjan Jovanovic     public static void afterClass() throws Exception
7205ff6674SDamjan Jovanovic     {
7305ff6674SDamjan Jovanovic         connection.tearDown();
74cdf0e10cSrcweir     }
75cdf0e10cSrcweir 
7605ff6674SDamjan Jovanovic     @Test
ExecuteTest01()7705ff6674SDamjan Jovanovic     public void ExecuteTest01()
7805ff6674SDamjan Jovanovic     {
7905ff6674SDamjan Jovanovic         XMultiServiceFactory xMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
8005ff6674SDamjan Jovanovic         Test01 aTest = new Test01( xMSF );
8105ff6674SDamjan Jovanovic         assertTrue( "Test01 failed!", aTest.test() );
82cdf0e10cSrcweir     }
83cdf0e10cSrcweir 
84cdf0e10cSrcweir }
85cdf0e10cSrcweir 
86