1*5c44d1b3SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*5c44d1b3SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*5c44d1b3SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*5c44d1b3SAndrew Rist  * distributed with this work for additional information
6*5c44d1b3SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*5c44d1b3SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*5c44d1b3SAndrew Rist  * "License"); you may not use this file except in compliance
9*5c44d1b3SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*5c44d1b3SAndrew Rist  *
11*5c44d1b3SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*5c44d1b3SAndrew Rist  *
13*5c44d1b3SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*5c44d1b3SAndrew Rist  * software distributed under the License is distributed on an
15*5c44d1b3SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*5c44d1b3SAndrew Rist  * KIND, either express or implied.  See the License for the
17*5c44d1b3SAndrew Rist  * specific language governing permissions and limitations
18*5c44d1b3SAndrew Rist  * under the License.
19*5c44d1b3SAndrew Rist  *
20*5c44d1b3SAndrew Rist  *************************************************************/
21*5c44d1b3SAndrew Rist 
22*5c44d1b3SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir package testtools.servicetests;
25cdf0e10cSrcweir 
26cdf0e10cSrcweir import com.sun.star.comp.helper.Bootstrap;
27cdf0e10cSrcweir import com.sun.star.container.XSet;
28cdf0e10cSrcweir import com.sun.star.lang.XMultiComponentFactory;
29cdf0e10cSrcweir import com.sun.star.uno.UnoRuntime;
30cdf0e10cSrcweir import com.sun.star.uno.XComponentContext;
31cdf0e10cSrcweir 
32cdf0e10cSrcweir public final class LocalServiceTest extends TestBase {
getTestServiceFactory()33cdf0e10cSrcweir     protected TestServiceFactory getTestServiceFactory() throws Exception {
34cdf0e10cSrcweir         return new TestServiceFactory() {
35cdf0e10cSrcweir                 public Object get() throws Exception {
36cdf0e10cSrcweir                     XComponentContext context
37cdf0e10cSrcweir                         = Bootstrap.createInitialComponentContext(null);
38cdf0e10cSrcweir                     XMultiComponentFactory serviceManager
39cdf0e10cSrcweir                         = context.getServiceManager();
40cdf0e10cSrcweir                     UnoRuntime.queryInterface(XSet.class, serviceManager).
41cdf0e10cSrcweir                         insert(new TestService());
42cdf0e10cSrcweir                     return serviceManager.createInstanceWithContext(
43cdf0e10cSrcweir                         "testtools.servicetests.TestService2", context);
44cdf0e10cSrcweir                 }
45cdf0e10cSrcweir 
46cdf0e10cSrcweir                 public void dispose() throws Exception {}
47cdf0e10cSrcweir             };
48cdf0e10cSrcweir     }
49cdf0e10cSrcweir }
50