diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2005-02-24 16:29:43 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2005-02-24 16:29:43 +0000 |
commit | 907e5d81d8b9ffab74e5b8a138d101e8d17013a4 (patch) | |
tree | c1e60675ba6c306683f079a6e2f885eeefd1ae0d | |
parent | f186bbb74fa9ec91f36785e3e0db95f7b9a8b429 (diff) |
INTEGRATION: CWS qadev21 (1.2.106); FILE MERGED
2005/02/08 08:03:33 cn 1.2.106.1: #i42069# enhance test with invalid object relations for XInitialization test
-rw-r--r-- | qadevOOo/tests/java/ifc/lang/_XInitialization.java | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/qadevOOo/tests/java/ifc/lang/_XInitialization.java b/qadevOOo/tests/java/ifc/lang/_XInitialization.java index c16e3e9a55a7..ed94ed497433 100644 --- a/qadevOOo/tests/java/ifc/lang/_XInitialization.java +++ b/qadevOOo/tests/java/ifc/lang/_XInitialization.java @@ -2,9 +2,9 @@ * * $RCSfile: _XInitialization.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change:$Date: 2003-09-08 10:45:05 $ + * last change:$Date: 2005-02-24 17:29:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -91,11 +91,31 @@ public class _XInitialization extends MultiMethodTest { boolean result = true ; try { + XInitialization xInit = (XInitialization) tEnv.getObjRelation("XInitialization.xIni"); + if (xInit == null) xInit = oObj; + + log.println("calling method with valid arguments..."); Object[] args = (Object[]) tEnv.getObjRelation("XInitialization.args"); if (args==null) { - oObj.initialize(new Object[0]); + xInit.initialize(new Object[0]); } else { - oObj.initialize(args); + xInit.initialize(args); + } + + // try to call the method with invalid parameters + Object[] ExArgs = (Object[]) tEnv.getObjRelation("XInitialization.ExceptionArgs"); + if (ExArgs !=null) { + log.println("calling method with in-valid arguments..."); + try{ + result = false; + xInit.initialize(ExArgs); + } catch (com.sun.star.uno.Exception e) { + log.println("Expected Exception 'com.sun.star.uno.Exception' occured -> OK") ; + result = true ; + } catch (Exception e) { + log.println("Un-Expected Exception occured -> FALSE") ; + log.println(e.toString()); + } } } catch (com.sun.star.uno.Exception e) { |