15c44d1b3SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 35c44d1b3SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 45c44d1b3SAndrew Rist * or more contributor license agreements. See the NOTICE file 55c44d1b3SAndrew Rist * distributed with this work for additional information 65c44d1b3SAndrew Rist * regarding copyright ownership. The ASF licenses this file 75c44d1b3SAndrew Rist * to you under the Apache License, Version 2.0 (the 85c44d1b3SAndrew Rist * "License"); you may not use this file except in compliance 95c44d1b3SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 115c44d1b3SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 135c44d1b3SAndrew Rist * Unless required by applicable law or agreed to in writing, 145c44d1b3SAndrew Rist * software distributed under the License is distributed on an 155c44d1b3SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 165c44d1b3SAndrew Rist * KIND, either express or implied. See the License for the 175c44d1b3SAndrew Rist * specific language governing permissions and limitations 185c44d1b3SAndrew Rist * under the License. 19cdf0e10cSrcweir * 205c44d1b3SAndrew Rist *************************************************************/ 215c44d1b3SAndrew Rist 225c44d1b3SAndrew 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 32*6e57475aSDamjan Jovanovic import org.junit.Test; 33*6e57475aSDamjan Jovanovic 34cdf0e10cSrcweir public final class LocalServiceTest extends TestBase { 35*6e57475aSDamjan Jovanovic @Test test()36*6e57475aSDamjan Jovanovic public void test() throws Exception { 37*6e57475aSDamjan Jovanovic super.runTest(); 38*6e57475aSDamjan Jovanovic } 39*6e57475aSDamjan Jovanovic getTestServiceFactory()40cdf0e10cSrcweir protected TestServiceFactory getTestServiceFactory() throws Exception { 41cdf0e10cSrcweir return new TestServiceFactory() { 42cdf0e10cSrcweir public Object get() throws Exception { 43cdf0e10cSrcweir XComponentContext context 44cdf0e10cSrcweir = Bootstrap.createInitialComponentContext(null); 45cdf0e10cSrcweir XMultiComponentFactory serviceManager 46cdf0e10cSrcweir = context.getServiceManager(); 47cdf0e10cSrcweir UnoRuntime.queryInterface(XSet.class, serviceManager). 48cdf0e10cSrcweir insert(new TestService()); 49cdf0e10cSrcweir return serviceManager.createInstanceWithContext( 50cdf0e10cSrcweir "testtools.servicetests.TestService2", context); 51cdf0e10cSrcweir } 52cdf0e10cSrcweir 53cdf0e10cSrcweir public void dispose() throws Exception {} 54cdf0e10cSrcweir }; 55cdf0e10cSrcweir } 56cdf0e10cSrcweir } 57