diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-05-22 08:12:18 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-05-22 08:12:18 +0000 |
commit | 5f1072c9dc6dbd1ddf1096908bdd5feaccd0be91 (patch) | |
tree | 690dbd6d75938c7c86d80531d48cedcc45c0e941 /jurt/test | |
parent | ab0c940fc523d47f9fc62dbe0f8f27a27901f0dd (diff) |
INTEGRATION: CWS uno4 (1.3.66); FILE MERGED
2003/05/07 12:37:25 sb 1.3.66.1: #108642# Cleaned up tests.
Diffstat (limited to 'jurt/test')
-rw-r--r-- | jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java | 62 |
1 files changed, 25 insertions, 37 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 c5d1d6523054..30cfa3f07499 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 @@ -2,9 +2,9 @@ * * $RCSfile: java_environment_Test.java,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: kr $ $Date: 2001-01-17 10:13:07 $ + * last change: $Author: vg $ $Date: 2003-05-22 09:12:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -58,55 +58,43 @@ * * ************************************************************************/ -package com.sun.star.lib.uno.environments.java; - - -import java.util.Vector; +package com.sun.star.lib.uno.environments.java; import com.sun.star.uno.Type; import com.sun.star.uno.XInterface; +import complexlib.ComplexTestCase; +public final class java_environment_Test extends ComplexTestCase { + public String getTestObjectName() { + return getClass().getName(); + } -public class java_environment_Test { - static public boolean test(Vector notpassed) throws Exception { - boolean passed = true; - - System.err.println("java_environment - doing tests..."); + public String[] getTestMethodNames() { + return new String[] { "test" }; + } + public void test() { java_environment env = new java_environment(null); Object obj = new Integer(3); - String oid[] = new String[1]; - - System.err.println("\tregistering ordinary interface twice..."); - Object obj2 = env.registerInterface(obj, oid, new Type(XInterface.class)); - Object obj3 = env.registerInterface(obj, oid, new Type(XInterface.class)); - - passed = passed && (obj == obj2) && (obj == obj3); + String[] oid = new String[1]; -// env.list(); + Object obj2 = env.registerInterface(obj, oid, + new Type(XInterface.class)); + Object obj3 = env.registerInterface(obj, oid, + new Type(XInterface.class)); + assure("register ordinary interface twice", + obj2 == obj && obj3 == obj); - System.err.println("\tasking for registered interface..."); - passed = passed && (obj == env.getRegisteredInterface(oid[0], new Type(XInterface.class))); + assure("ask for registered interface", + env.getRegisteredInterface(oid[0], new Type(XInterface.class)) + == obj); - - System.err.println("\trevoking interface..."); env.revokeInterface(oid[0], new Type(XInterface.class)); env.revokeInterface(oid[0], new Type(XInterface.class)); - - passed = passed && (null == env.getRegisteredInterface(oid[0], new Type(XInterface.class))); - - System.err.println("java_environment - tests passed? " + passed); - - if(!passed && notpassed != null) - notpassed.addElement("java_environment - tests passed? " + passed); - - - return passed; - } - - static public void main(String args[]) throws Exception{ - test(null); + assure("revoke interface", + env.getRegisteredInterface(oid[0], new Type(XInterface.class)) + == null); } } |