summaryrefslogtreecommitdiff
path: root/bridges/test/com
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-11-23 12:08:25 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-11-23 12:08:25 +0000
commitcbf3aed4e7d0d87a698e4eaea7b1845374f22ccb (patch)
treef02c04de900840b6315977f51b4e4da7a1f88a64 /bridges/test/com
parentc36fc97ed76a02cbb1b8f83c46fe20257e24f4fe (diff)
INTEGRATION: CWS sb79 (1.5.136); FILE MERGED
2007/09/27 12:01:05 sb 1.5.136.1: #i51323# refactored
Diffstat (limited to 'bridges/test/com')
-rw-r--r--bridges/test/com/sun/star/lib/TestBed.java24
-rw-r--r--bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java10
2 files changed, 21 insertions, 13 deletions
diff --git a/bridges/test/com/sun/star/lib/TestBed.java b/bridges/test/com/sun/star/lib/TestBed.java
index 1f8d666f654b..1ad39fe58f59 100644
--- a/bridges/test/com/sun/star/lib/TestBed.java
+++ b/bridges/test/com/sun/star/lib/TestBed.java
@@ -4,9 +4,9 @@
*
* $RCSfile: TestBed.java,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 22:53:17 $
+ * last change: $Author: ihi $ $Date: 2007-11-23 13:06:30 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -120,9 +120,20 @@ public final class TestBed {
}
public static abstract class Client {
- protected abstract boolean run(XBridge bridge) throws Throwable;
+ protected abstract boolean run(XComponentContext context)
+ throws Throwable;
- protected final XBridge getBridge() throws com.sun.star.uno.Exception {
+ protected final String getConnectionDescription() {
+ return connectionDescription;
+ }
+
+ protected final String getProtocolDescription() {
+ return protocolDescription;
+ }
+
+ protected final XBridge getBridge(XComponentContext context)
+ throws com.sun.star.uno.Exception
+ {
XConnector connector = Connector.create(context);
XBridgeFactory factory = (XBridgeFactory) UnoRuntime.queryInterface(
XBridgeFactory.class,
@@ -140,8 +151,7 @@ public final class TestBed {
protected final void execute() {
int status = CLIENT_FAILED;
try {
- context = Bootstrap.createInitialComponentContext(null);
- if (run(getBridge())) {
+ if (run(Bootstrap.createInitialComponentContext(null))) {
status = CLIENT_DONE;
}
} catch (Throwable e) {
@@ -149,8 +159,6 @@ public final class TestBed {
}
System.exit(status);
}
-
- private XComponentContext context;
}
private static final class Server extends Thread {
diff --git a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java
index ec93c3c1e810..1c78c264e1e8 100644
--- a/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java
+++ b/bridges/test/com/sun/star/lib/uno/bridges/java_remote/Bug92174_Test.java
@@ -4,9 +4,9 @@
*
* $RCSfile: Bug92174_Test.java,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 22:55:00 $
+ * last change: $Author: ihi $ $Date: 2007-11-23 13:08:25 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -35,12 +35,12 @@
package com.sun.star.lib.uno.bridges.javaremote;
-import com.sun.star.bridge.XBridge;
import com.sun.star.bridge.XInstanceProvider;
import com.sun.star.lib.TestBed;
import com.sun.star.lib.uno.typeinfo.MethodTypeInfo;
import com.sun.star.lib.uno.typeinfo.TypeInfo;
import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XComponentContext;
import com.sun.star.uno.XInterface;
import complexlib.ComplexTestCase;
@@ -59,9 +59,9 @@ public final class Bug92174_Test extends ComplexTestCase {
new Client().execute();
}
- protected boolean run(XBridge bridge) throws Throwable {
+ protected boolean run(XComponentContext context) throws Throwable {
XTransport t = (XTransport) UnoRuntime.queryInterface(
- XTransport.class, bridge.getInstance("Transport"));
+ XTransport.class, getBridge(context).getInstance("Transport"));
t.setDerived(new XDerived() {
public void fn() {}
});