summaryrefslogtreecommitdiff
path: root/jurt/test/com/sun/star/uno/UnoRuntime_EnvironmentTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'jurt/test/com/sun/star/uno/UnoRuntime_EnvironmentTest.java')
-rw-r--r--jurt/test/com/sun/star/uno/UnoRuntime_EnvironmentTest.java37
1 files changed, 16 insertions, 21 deletions
diff --git a/jurt/test/com/sun/star/uno/UnoRuntime_EnvironmentTest.java b/jurt/test/com/sun/star/uno/UnoRuntime_EnvironmentTest.java
index 0ee0e1d32ccd..58186729d2e7 100644
--- a/jurt/test/com/sun/star/uno/UnoRuntime_EnvironmentTest.java
+++ b/jurt/test/com/sun/star/uno/UnoRuntime_EnvironmentTest.java
@@ -28,19 +28,12 @@
package com.sun.star.uno;
import com.sun.star.comp.connections.PipedConnection;
-import complexlib.ComplexTestCase;
+import org.junit.Test;
import util.WaitUnreachable;
+import static org.junit.Assert.*;
-public final class UnoRuntime_EnvironmentTest extends ComplexTestCase {
- public String getTestObjectName() {
- return getClass().getName();
- }
-
- public String[] getTestMethodNames() {
- return new String[] { "test_getEnvironment", "test_getBridge" };
- }
-
- public void test_getEnvironment() throws java.lang.Exception {
+public final class UnoRuntime_EnvironmentTest {
+ @Test public void test_getEnvironment() throws java.lang.Exception {
Object o1 = new Object();
Object o2 = new Object();
@@ -51,22 +44,24 @@ public final class UnoRuntime_EnvironmentTest extends ComplexTestCase {
UnoRuntime.getEnvironment("java", o2));
// ensure that the environments are different
- assure("", java_environment1.get() != java_environment2.get());
+ assertNotSame(java_environment1.get(), java_environment2.get());
// test if we get the same environment when we reget it
- assure("",
- UnoRuntime.areSame(java_environment1.get(),
- UnoRuntime.getEnvironment("java", o1)));
- assure("",
- UnoRuntime.areSame(java_environment2.get(),
- UnoRuntime.getEnvironment("java", o2)));
+ assertTrue(
+ UnoRuntime.areSame(
+ java_environment1.get(),
+ UnoRuntime.getEnvironment("java", o1)));
+ assertTrue(
+ UnoRuntime.areSame(
+ java_environment2.get(),
+ UnoRuntime.getEnvironment("java", o2)));
// drop the environments and wait until they are gc
java_environment1.waitUnreachable();
java_environment2.waitUnreachable();
}
- public void test_getBridge() throws java.lang.Exception {
+ @Test public void test_getBridge() throws java.lang.Exception {
PipedConnection conn = new PipedConnection(new Object[0]);
new PipedConnection(new Object[] { conn });
@@ -79,7 +74,7 @@ public final class UnoRuntime_EnvironmentTest extends ComplexTestCase {
IBridge iBridge_tmp = UnoRuntime.getBridgeByName(
"java", null, "remote", "testname",
new Object[] { "urp", conn, null });
- assure("", UnoRuntime.areSame(iBridge_tmp, iBridge));
+ assertTrue(UnoRuntime.areSame(iBridge_tmp, iBridge));
// dispose the bridge, this removes the entry from the runtime
iBridge.dispose();
@@ -91,6 +86,6 @@ public final class UnoRuntime_EnvironmentTest extends ComplexTestCase {
iBridge_tmp = UnoRuntime.getBridgeByName(
"java", null, "remote", "testname",
new Object[]{ "urp", conn, null });
- assure("", !UnoRuntime.areSame(iBridge_tmp, iBridge));
+ assertFalse(UnoRuntime.areSame(iBridge_tmp, iBridge));
}
}