diff options
Diffstat (limited to 'testtools/source/servicetests')
-rw-r--r-- | testtools/source/servicetests/LocalServiceTest.java | 53 | ||||
-rw-r--r-- | testtools/source/servicetests/RemoteServiceTest.java | 121 | ||||
-rw-r--r-- | testtools/source/servicetests/TestBase.java | 145 | ||||
-rw-r--r-- | testtools/source/servicetests/TestService.java | 197 | ||||
-rw-r--r-- | testtools/source/servicetests/TestService1.idl | 55 | ||||
-rw-r--r-- | testtools/source/servicetests/TestService2.idl | 47 | ||||
-rw-r--r-- | testtools/source/servicetests/XTestService1.idl | 41 | ||||
-rw-r--r-- | testtools/source/servicetests/XTestService2.idl | 41 | ||||
-rw-r--r-- | testtools/source/servicetests/XTestService3.idl | 41 | ||||
-rw-r--r-- | testtools/source/servicetests/XTestService4.idl | 41 | ||||
-rw-r--r-- | testtools/source/servicetests/makefile.mk | 44 |
11 files changed, 826 insertions, 0 deletions
diff --git a/testtools/source/servicetests/LocalServiceTest.java b/testtools/source/servicetests/LocalServiceTest.java new file mode 100644 index 000000000000..bb12235d1b37 --- /dev/null +++ b/testtools/source/servicetests/LocalServiceTest.java @@ -0,0 +1,53 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package testtools.servicetests; + +import com.sun.star.comp.helper.Bootstrap; +import com.sun.star.container.XSet; +import com.sun.star.lang.XMultiComponentFactory; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XComponentContext; + +public final class LocalServiceTest extends TestBase { + protected TestServiceFactory getTestServiceFactory() throws Exception { + return new TestServiceFactory() { + public Object get() throws Exception { + XComponentContext context + = Bootstrap.createInitialComponentContext(null); + XMultiComponentFactory serviceManager + = context.getServiceManager(); + UnoRuntime.queryInterface(XSet.class, serviceManager). + insert(new TestService()); + return serviceManager.createInstanceWithContext( + "testtools.servicetests.TestService2", context); + } + + public void dispose() throws Exception {} + }; + } +} diff --git a/testtools/source/servicetests/RemoteServiceTest.java b/testtools/source/servicetests/RemoteServiceTest.java new file mode 100644 index 000000000000..8abf6674f1e5 --- /dev/null +++ b/testtools/source/servicetests/RemoteServiceTest.java @@ -0,0 +1,121 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package testtools.servicetests; + +import com.sun.star.bridge.XBridgeFactory; +import com.sun.star.bridge.XInstanceProvider; +import com.sun.star.bridge.UnoUrlResolver; +import com.sun.star.comp.helper.Bootstrap; +import com.sun.star.connection.Acceptor; +import com.sun.star.connection.XConnection; +import com.sun.star.container.XSet; +import com.sun.star.lang.XMultiComponentFactory; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XComponentContext; +import complexlib.ComplexTestCase; +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.PrintStream; + +public final class RemoteServiceTest extends TestBase { + protected TestServiceFactory getTestServiceFactory() throws Exception { + final Process p = Runtime.getRuntime().exec(new String[] { + "java", "-classpath", System.getProperty("java.class.path"), + Server.class.getName() }); + pipe(p.getInputStream(), System.out, "CO> "); + pipe(p.getErrorStream(), System.err, "CE> "); + Thread.sleep(5000); // wait for server to start accepting + return new TestServiceFactory() { + public Object get() throws Exception { + return (UnoUrlResolver.create( + Bootstrap.createInitialComponentContext(null))). + resolve( + "uno:" + CONNECTION_DESCRIPTION + ";" + + PROTOCOL_DESCRIPTION + + ";testtools.servicetests.TestService2"); + } + + public void dispose() throws Exception { + p.waitFor(); + } + }; + } + + public static final class Server { + public static void main(String[] arguments) throws Exception { + XComponentContext context + = Bootstrap.createInitialComponentContext(null); + XMultiComponentFactory serviceManager + = context.getServiceManager(); + UnoRuntime.queryInterface(XSet.class, serviceManager). + insert(new TestService()); + final Object instance = serviceManager.createInstanceWithContext( + "testtools.servicetests.TestService2", context); + XBridgeFactory bridgeFactory + = UnoRuntime.queryInterface( + XBridgeFactory.class, + serviceManager.createInstanceWithContext( + "com.sun.star.bridge.BridgeFactory", context)); + XConnection connection = Acceptor.create(context).accept( + CONNECTION_DESCRIPTION); + bridgeFactory.createBridge( + "", PROTOCOL_DESCRIPTION, connection, + new XInstanceProvider() { + public Object getInstance(String instanceName) { + return instance; + } + }); + } + } + + private void pipe(final InputStream in, final PrintStream out, + final String prefix) { + new Thread("Pipe: " + prefix) { + public void run() { + BufferedReader r + = new BufferedReader(new InputStreamReader(in)); + try { + for (;;) { + String s = r.readLine(); + if (s == null) { + break; + } + out.println(prefix + s); + } + } catch (java.io.IOException e) { + e.printStackTrace(System.err); + } + } + }.start(); + } + + private static final String CONNECTION_DESCRIPTION + = "socket,host=localhost,port=12345"; + private static final String PROTOCOL_DESCRIPTION = "urp"; +} diff --git a/testtools/source/servicetests/TestBase.java b/testtools/source/servicetests/TestBase.java new file mode 100644 index 000000000000..248ff96007e2 --- /dev/null +++ b/testtools/source/servicetests/TestBase.java @@ -0,0 +1,145 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package testtools.servicetests; + +import com.sun.star.uno.UnoRuntime; +import complexlib.ComplexTestCase; +import util.WaitUnreachable; + +public abstract class TestBase extends ComplexTestCase { + public final String[] getTestMethodNames() { + return new String[] { "test" }; + } + + public final void test() throws Exception { + TestServiceFactory factory = getTestServiceFactory(); + TestService2 t = UnoRuntime.queryInterface( + TestService2.class, factory.get()); + assure(t != null); + assure(UnoRuntime.queryInterface(TestService1.class, t) == t); + assure(UnoRuntime.queryInterface(XTestService1.class, t) == t); + assure(UnoRuntime.queryInterface(XTestService2.class, t) == t); + assure(t.fn1() == 1); + assure(t.getProp1() == 1); + t.setProp1(0); + assure(t.getProp1() == 0); + assure(t.getProp2() == 2); + /*try { + t.getProp3Void(); + failed(); + } catch (VoidPropertyException e) { + }*/ + assure(t.getProp3Long() == 3); + /*try { + t.getProp4None(); + failed(); + } catch (OptionalPropertyException e) { + }*/ + assure(t.getProp4Long() == 4); + /*try { + t.getProp5None(); + failed(); + } catch (OptionalPropertyException e) { + } + try { + t.getProp5Void(); + failed(); + } catch (VoidPropertyException e) { + }*/ + assure(t.getProp5Long() == 5); + assure(t.getProp6() == 6); + /*t.clearProp6(); + try { + t.getProp6(); + failed(); + } catch (VoidPropertyException e) { + }*/ + t.setProp6(0); + assure(t.getProp6() == 0); + /*try { + t.getProp7None(); + failed(); + } catch (OptionalPropertyException e) { + } + try { + t.setProp7None(0); + failed(); + } catch (OptionalPropertyException e) { + } + try { + t.clearProp7None(); + failed(); + } catch (OptionalPropertyException e) { + }*/ + assure(t.getProp7() == 7); + /*t.clearProp7(); + try { + t.getProp7(); + failed(); + } catch (VoidPropertyException e) { + }*/ + t.setProp7(0); + assure(t.getProp7() == 0); + /*try { + t.getProp8None(); + failed(); + } catch (OptionalPropertyException e) { + } + try { + t.setProp8None(0); + failed(); + } catch (OptionalPropertyException e) { + }*/ + assure(t.getProp8Long() == 8); + t.setProp8Long(0); + assure(t.getProp8Long() == 0); + assure(t.fn2() == 2); + XTestService3 t3 = UnoRuntime.queryInterface(XTestService3.class, t); + assure(t3 != null); + assure(t3.fn3() == 3); + XTestService4 t4 = UnoRuntime.queryInterface(XTestService4.class, t); + assure(t4 == null); + WaitUnreachable u = new WaitUnreachable(t); + t = null; + WaitUnreachable.ensureFinalization(t3); + t3 = null; + WaitUnreachable.ensureFinalization(t4); + t4 = null; + u.waitUnreachable(); + factory.dispose(); + } + + protected abstract TestServiceFactory getTestServiceFactory() + throws Exception; + + protected interface TestServiceFactory { + Object get() throws Exception; + + void dispose() throws Exception; + } +} diff --git a/testtools/source/servicetests/TestService.java b/testtools/source/servicetests/TestService.java new file mode 100644 index 000000000000..279aaabe4b70 --- /dev/null +++ b/testtools/source/servicetests/TestService.java @@ -0,0 +1,197 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package testtools.servicetests; + +import com.sun.star.lang.NoSupportException; +import com.sun.star.lang.XServiceInfo; +import com.sun.star.lang.XSingleComponentFactory; +/*import com.sun.star.uno.OptionalPropertyException;*/ +/*import com.sun.star.uno.VoidPropertyException;*/ +import com.sun.star.uno.XComponentContext; + +public final class TestService implements XServiceInfo, XSingleComponentFactory +{ + public String getImplementationName() { + return getClass().getName(); + } + + public boolean supportsService(String serviceName) { + return serviceName.equals(SERVICE_NAME); + } + + public String[] getSupportedServiceNames() { + return new String[] { SERVICE_NAME }; + } + + public Object createInstanceWithContext(XComponentContext context) + throws com.sun.star.uno.Exception + { + return new Service(); + } + + public Object createInstanceWithArgumentsAndContext( + Object[] arguments, XComponentContext context) + throws com.sun.star.uno.Exception + { + throw new NoSupportException( + "createInstanceWithArgumentsAndContext", this); + } + + private static final class Service implements TestService2, XTestService3 { + public int fn1() { + return 1; + } + + public int getProp1() { + return prop1; + } + + public void setProp1(int value) { + prop1 = value; + } + + public int getProp2() { + return 2; + } + + /*public int getProp3Void() throws VoidPropertyException { + throw new VoidPropertyException("Prop3Void", this); + }*/ + + public int getProp3Long() /*throws VoidPropertyException*/ { + return 3; + } + + /*public int getProp4None() throws OptionalPropertyException { + throw new OptionalPropertyException("Prop4None", this); + }*/ + + public int getProp4Long() /*throws OptionalPropertyException*/ { + return 4; + } + + /*public int getProp5None() + throws OptionalPropertyException, VoidPropertyException + { + throw new OptionalPropertyException("Prop4None", this); + }*/ + + /*public int getProp5Void() + throws OptionalPropertyException, VoidPropertyException + { + throw new VoidPropertyException("Prop4None", this); + }*/ + + public int getProp5Long() + /*throws OptionalPropertyException, VoidPropertyException*/ + { + return 5; + } + + public int getProp6() /*throws VoidPropertyException*/ { + /*if (prop6 == null) { + throw new VoidPropertyException("Prop6", this); + } else {*/ + return prop6.intValue(); + /*}*/ + } + + public void setProp6(int value) { + prop6 = new Integer(value); + } + + /*public void clearProp6() { + prop6 = null; + }*/ + + /*public int getProp7None() + throws OptionalPropertyException, VoidPropertyException + { + throw new OptionalPropertyException("Prop7None", this); + }*/ + + /*public void setProp7None(int value) throws OptionalPropertyException { + throw new OptionalPropertyException("Prop7None", this); + }*/ + + /*public void clearProp7None() throws OptionalPropertyException { + throw new OptionalPropertyException("Prop7None", this); + }*/ + + public int getProp7() + /*throws OptionalPropertyException, VoidPropertyException*/ + { + /*if (prop7 == null) { + throw new VoidPropertyException("Prop7", this); + } else {*/ + return prop7.intValue(); + /*}*/ + } + + public void setProp7(int value) /*throws OptionalPropertyException*/ { + prop7 = new Integer(value); + } + + /*public void clearProp7() throws OptionalPropertyException { + prop7 = null; + }*/ + + /*public int getProp8None() throws OptionalPropertyException { + throw new OptionalPropertyException("Prop8None", this); + }*/ + + /*public void setProp8None(int value) throws OptionalPropertyException { + throw new OptionalPropertyException("Prop8None", this); + }*/ + + public int getProp8Long() /*throws OptionalPropertyException*/ { + return prop8; + } + + public void setProp8Long(int value) /*throws OptionalPropertyException*/ + { + prop8 = value; + } + + public int fn2() { + return 2; + } + + public int fn3() { + return 3; + } + + private int prop1 = 1; + private Integer prop6 = new Integer(6); + private Integer prop7 = new Integer(7); + private int prop8 = 8; + } + + private static final String SERVICE_NAME + = "testtools.servicetests.TestService2"; +} diff --git a/testtools/source/servicetests/TestService1.idl b/testtools/source/servicetests/TestService1.idl new file mode 100644 index 000000000000..3bf04c6cdc5f --- /dev/null +++ b/testtools/source/servicetests/TestService1.idl @@ -0,0 +1,55 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __testtools_servicetests_TestService1_idl__ +#define __testtools_servicetests_TestService1_idl__ + +#include "XTestService1.idl" + +module testtools { module servicetests { + +interface TestService1 { + interface XTestService1; + [attribute] long Prop1; + [attribute, readonly] long Prop2; + /*[attribute, readonly, maybevoid] long Prop3Void;*/ + [attribute, readonly/*, maybevoid*/] long Prop3Long; + /*[attribute, readonly, optional] long Prop4None;*/ + [attribute, readonly/*, optional*/] long Prop4Long; + /*[attribute, readonly, maybevoid, optional] long Prop5None;*/ + /*[attribute, readonly, maybevoid, optional] long Prop5Void;*/ + [attribute, readonly/*, maybevoid, optional*/] long Prop5Long; + [attribute/*, maybevoid*/] long Prop6; + /*[attribute, maybevoid, optional] long Prop7None;*/ + [attribute/*, maybevoid, optional*/] long Prop7; + /*[attribute, optional] long Prop8None;*/ + [attribute/*, optional*/] long Prop8Long; +}; + +}; }; + +#endif diff --git a/testtools/source/servicetests/TestService2.idl b/testtools/source/servicetests/TestService2.idl new file mode 100644 index 000000000000..cf487bcd8dc2 --- /dev/null +++ b/testtools/source/servicetests/TestService2.idl @@ -0,0 +1,47 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __testtools_servicetests_TestService2_idl__ +#define __testtools_servicetests_TestService2_idl__ + +#include "TestService1.idl" +#include "XTestService2.idl" +#include "XTestService3.idl" +#include "XTestService4.idl" + +module testtools { module servicetests { + +interface TestService2 { + interface TestService1; + interface XTestService2; + /*[optional] interface XTestService3;*/ + /*[optional] interface XTestService4;*/ +}; + +}; }; + +#endif diff --git a/testtools/source/servicetests/XTestService1.idl b/testtools/source/servicetests/XTestService1.idl new file mode 100644 index 000000000000..6d6bf1e44802 --- /dev/null +++ b/testtools/source/servicetests/XTestService1.idl @@ -0,0 +1,41 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __testtools_servicetests_XTestService1_idl__ +#define __testtools_servicetests_XTestService1_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +module testtools { module servicetests { + +interface XTestService1: com::sun::star::uno::XInterface { + long fn1(); +}; + +}; }; + +#endif diff --git a/testtools/source/servicetests/XTestService2.idl b/testtools/source/servicetests/XTestService2.idl new file mode 100644 index 000000000000..be7de2437244 --- /dev/null +++ b/testtools/source/servicetests/XTestService2.idl @@ -0,0 +1,41 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __testtools_servicetests_XTestService2_idl__ +#define __testtools_servicetests_XTestService2_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +module testtools { module servicetests { + +interface XTestService2: com::sun::star::uno::XInterface { + long fn2(); +}; + +}; }; + +#endif diff --git a/testtools/source/servicetests/XTestService3.idl b/testtools/source/servicetests/XTestService3.idl new file mode 100644 index 000000000000..1933ecf729e6 --- /dev/null +++ b/testtools/source/servicetests/XTestService3.idl @@ -0,0 +1,41 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __testtools_servicetests_XTestService3_idl__ +#define __testtools_servicetests_XTestService3_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +module testtools { module servicetests { + +interface XTestService3: com::sun::star::uno::XInterface { + long fn3(); +}; + +}; }; + +#endif diff --git a/testtools/source/servicetests/XTestService4.idl b/testtools/source/servicetests/XTestService4.idl new file mode 100644 index 000000000000..5d7e80c9a8ed --- /dev/null +++ b/testtools/source/servicetests/XTestService4.idl @@ -0,0 +1,41 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __testtools_servicetests_XTestService4_idl__ +#define __testtools_servicetests_XTestService4_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +module testtools { module servicetests { + +interface XTestService4: com::sun::star::uno::XInterface { + long fn4(); +}; + +}; }; + +#endif diff --git a/testtools/source/servicetests/makefile.mk b/testtools/source/servicetests/makefile.mk new file mode 100644 index 000000000000..d92d9775821e --- /dev/null +++ b/testtools/source/servicetests/makefile.mk @@ -0,0 +1,44 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ := ..$/.. +PRJNAME := testtools +TARGET := testtools_servicetests + +PACKAGE := testtools$/servicetests +JAVATESTFILES := LocalServiceTest.java RemoteServiceTest.java +JAVAFILES := TestBase.java TestService.java +IDLTESTFILES := \ + TestService1.idl \ + TestService2.idl \ + XTestService1.idl \ + XTestService2.idl \ + XTestService3.idl \ + XTestService4.idl +JARFILES := juh.jar jurt.jar ridl.jar + +.INCLUDE: javaunittest.mk |