bump product version to 4.2.0.1
[LibreOffice.git] / qadevOOo / tests / java / mod / _toolkit / UnoControlProgressBarModel.java
blobedace2accb30ce1e80df9eac77ded9663c0c8ddd
1 /*
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 .
18 package mod._toolkit;
20 import com.sun.star.lang.XMultiServiceFactory;
21 import com.sun.star.uno.XInterface;
23 import java.io.PrintWriter;
25 import lib.StatusException;
26 import lib.TestCase;
27 import lib.TestEnvironment;
28 import lib.TestParameters;
31 /**
32 * Test for object which is represented by service
33 * <code>com.sun.star.awt.UnoControlProgressBarModel</code>. <p>
34 * Object implements the following interfaces :
35 * <ul>
36 * <li> <code>com::sun::star::awt::UnoControlProgressBarModel</code></li>
37 * <li> <code>com::sun::star::io::XPersistObject</code></li>
38 * <li> <code>com::sun::star::lang::XComponent</code></li>
39 * <li> <code>com::sun::star::beans::XPropertySet</code></li>
40 * <li> <code>com::sun::star::beans::XMultiPropertySet</code></li>
41 * </ul>
42 * This object test <b> is NOT </b> designed to be run in several
43 * threads concurently.
44 * @see com.sun.star.awt.UnoControlProgressBarModel
45 * @see com.sun.star.io.XPersistObject
46 * @see com.sun.star.lang.XComponent
47 * @see com.sun.star.beans.XPropertySet
48 * @see com.sun.star.beans.XMultiPropertySet
49 * @see ifc.awt._UnoControlProgressBarModel
50 * @see ifc.io._XPersistObject
51 * @see ifc.lang._XComponent
52 * @see ifc.beans._XPropertySet
53 * @see ifc.beans._XMultiPropertySet
55 public class UnoControlProgressBarModel extends TestCase {
56 /**
57 * Creating a Testenvironment for the interfaces to be tested.
58 * Creates an instance of the service
59 * <code>com.sun.star.awt.UnoControlProgressBarModel</code>.
60 * Object relations created :
61 * <ul>
62 * <li> <code>'OBJNAME'</code> for
63 * {@link ifc.io._XPersistObject} </li>
64 * </ul>
66 public synchronized TestEnvironment createTestEnvironment(TestParameters Param,
67 PrintWriter log)
68 throws StatusException {
69 XInterface oObj = null;
71 try {
72 oObj = (XInterface) ((XMultiServiceFactory) Param.getMSF()).createInstance(
73 "com.sun.star.awt.UnoControlProgressBarModel");
74 } catch (Exception e) {
77 log.println("creating a new environment for object");
79 TestEnvironment tEnv = new TestEnvironment(oObj);
81 tEnv.addObjRelation("OBJNAME", "stardiv.vcl.controlmodel.ProgressBar");
83 return tEnv;
84 } // finish method getTestEnvironment