diff options
Diffstat (limited to 'jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java')
-rw-r--r-- | jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java b/jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java index 162c1636c720..6d9e42072cf0 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java +++ b/jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java @@ -29,18 +29,11 @@ package com.sun.star.lib.uno.environments.java; import com.sun.star.uno.Type; import com.sun.star.uno.XInterface; -import complexlib.ComplexTestCase; +import org.junit.Test; +import static org.junit.Assert.*; -public final class java_environment_Test extends ComplexTestCase { - public String getTestObjectName() { - return getClass().getName(); - } - - public String[] getTestMethodNames() { - return new String[] { "test" }; - } - - public void test() { +public final class java_environment_Test { + @Test public void test() { java_environment env = new java_environment(null); Object obj = new Integer(3); @@ -50,17 +43,19 @@ public final class java_environment_Test extends ComplexTestCase { new Type(XInterface.class)); Object obj3 = env.registerInterface(obj, oid, new Type(XInterface.class)); - assure("register ordinary interface twice", - obj2 == obj && obj3 == obj); + // Register ordinary interface twice: + assertSame(obj, obj2); + assertSame(obj, obj3); - assure("ask for registered interface", - env.getRegisteredInterface(oid[0], new Type(XInterface.class)) - == obj); + // Ask for registered interface: + assertSame( + obj, + env.getRegisteredInterface(oid[0], new Type(XInterface.class))); env.revokeInterface(oid[0], new Type(XInterface.class)); env.revokeInterface(oid[0], new Type(XInterface.class)); - assure("revoke interface", - env.getRegisteredInterface(oid[0], new Type(XInterface.class)) - == null); + // Revoke interface: + assertNull( + env.getRegisteredInterface(oid[0], new Type(XInterface.class))); } } |