Kaydet (Commit) e33d9d74 authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS sb44 (1.2.8); FILE MERGED

2005/12/12 15:55:41 sb 1.2.8.1: #i51419# Added javanative-test.
üst f4a9c1ed
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: JavaMain.java,v $ * $RCSfile: JavaMain.java,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: rt $ $Date: 2005-09-09 10:12:37 $ * last change: $Author: kz $ $Date: 2006-01-03 12:39:56 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -41,10 +41,7 @@ import com.sun.star.lang.XMultiServiceFactory; ...@@ -41,10 +41,7 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XSingleServiceFactory; import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.registry.XRegistryKey; import com.sun.star.registry.XRegistryKey;
import com.sun.star.uno.XComponentContext; import com.sun.star.uno.XComponentContext;
import test.types.CppTest; import test.java.tester.Tester;
import test.types.JavaTest;
import test.types.TestException;
import test.types.XTest;
public final class JavaMain implements XMain { public final class JavaMain implements XMain {
public JavaMain(XComponentContext context) { public JavaMain(XComponentContext context) {
...@@ -52,8 +49,7 @@ public final class JavaMain implements XMain { ...@@ -52,8 +49,7 @@ public final class JavaMain implements XMain {
} }
public int run(String[] arguments) { public int run(String[] arguments) {
test(CppTest.create(context), CppTest.class.getName()); Tester.test(context);
test(JavaTest.create(context), JavaTest.class.getName());
return 0; return 0;
} }
...@@ -74,18 +70,6 @@ public final class JavaMain implements XMain { ...@@ -74,18 +70,6 @@ public final class JavaMain implements XMain {
} }
} }
private static final void test(XTest test, String name) {
boolean ok = false;
try {
test.throwException();
} catch (TestException e) {
ok = true;
}
if (!ok) {
throw new RuntimeException(name + ".throwException failed");
}
}
private static final String IMPLEMENTATION_NAME private static final String IMPLEMENTATION_NAME
= "test.java.javamain.Component"; = "test.java.javamain.Component";
private static final String SERVICE_NAME = "test.dummy.JavaMain"; private static final String SERVICE_NAME = "test.dummy.JavaMain";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment