2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package complex
.imageManager
;
24 import com
.sun
.star
.lang
.XInitialization
;
25 import lib
.TestParameters
;
28 * Testing <code>com.sun.star.lang.XInitialization</code>
29 * interface methods. <p>
30 * This test needs the following object relations :
32 * <li> <code>'XInitialization.args'</code> (of type <code>Object[]</code>):
33 * (<b>Optional</b>) : argument for <code>initialize</code>
34 * method. If omitted, zero length array is used. </li>
36 * Test is multithread compliant. <p>
37 * Till the present time there was no need to recreate environment
38 * after this test completion.
40 public class _XInitialization
{
43 private final TestParameters tEnv
;
44 private XInitialization oObj
= null;
46 public _XInitialization(TestParameters tEnv
, XInitialization oObj
) {
53 * Test calls the method with 0 length array and checks that
54 * no exceptions were thrown. <p>
55 * Has <b> OK </b> status if no exceptions were thrown. <p>
57 public boolean _initialize() {
58 boolean result
= true ;
61 Object
[] args
= (Object
[]) tEnv
.get("XInitialization.args");
63 oObj
.initialize(new Object
[0]);
65 oObj
.initialize(args
);
68 } catch (com
.sun
.star
.uno
.Exception e
) {
69 System
.out
.println("Exception occurred while method calling.") ;
74 } // finished _initialize()
76 } // finished class _XInitialization