1 /*
2  * This file is part of the LibreOffice project.
3  *
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/.
7  *
8  * This file incorporates work covered by the following license notice:
9  *
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 .
17  */
18 
19 package ifc.awt;
20 
21 import lib.MultiMethodTest;
22 import lib.Status;
23 
24 import com.sun.star.awt.XControlContainer;
25 import com.sun.star.awt.XTabController;
26 import com.sun.star.awt.XTabControllerModel;
27 
28 /**
29 * This interface is DEPRECATED !!!
30 * All test results are SKIPPED.OK now.
31 * Testing <code>com.sun.star.awt.XTabController</code>
32 * interface methods :
33 * <ul>
34 *  <li><code> activateFirst()</code></li>
35 *  <li><code> activateLast()</code></li>
36 *  <li><code> activateTabOrder()</code></li>
37 *  <li><code> autoTabOrder()</code></li>
38 *  <li><code> getContainer()</code></li>
39 *  <li><code> getControls()</code></li>
40 *  <li><code> getModel()</code></li>
41 *  <li><code> setContainer()</code></li>
42 *  <li><code> setModel()</code></li>
43 * </ul><p>
44 * This test needs the following object relations :
45 * <ul>
46 *  <li> <code>'MODEL'</code> : <code>XTabControllerModel</code> a model for
47 *   the object</li>
48 *  <li> <code>'CONTAINER'</code> : <code>XControlContainer</code> a container
49 *   for the object</li>
50 * <ul> <p>
51 * @see com.sun.star.awt.XTabController
52 */
53 public class _XTabController extends MultiMethodTest {
54     public XTabController oObj = null;
55 
56     /**
57     * Test calls the method with object relation 'MODEL' as a parameter.<p>
58     * Has <b> OK </b> status if the method successfully returns
59     * and no exceptions were thrown. <p>
60     */
_setModel()61     public void _setModel() {
62         oObj.setModel( (XTabControllerModel) tEnv.getObjRelation("MODEL"));
63         tRes.tested("setModel()", Status.skipped(true) );
64     }
65 
66     /**
67     * Test calls the method, then checks returned value.<p>
68     * Has <b> OK </b> status if method returns a value that equals to
69     * corresponding object relation.<p>
70     * The following method tests are to be completed successfully before :
71     * <ul>
72     *  <li> <code> setModel() </code> : sets model for the object </li>
73     * </ul>
74     */
_getModel()75     public void _getModel() {
76         requiredMethod("setModel()");
77         oObj.getModel();
78         tRes.tested("getModel()", Status.skipped(true));
79     }
80 
81     /**
82     * Test calls the method with object relation 'CONTAINER' as a parameter.<p>
83     * Has <b> OK </b> status if the method successfully returns
84     * and no exceptions were thrown. <p>
85     */
_setContainer()86     public void _setContainer() {
87         oObj.setContainer( (XControlContainer)
88             tEnv.getObjRelation("CONTAINER"));
89         tRes.tested("setContainer()", Status.skipped(true));
90     }
91 
92     /**
93     * Test calls the method, then checks returned value.<p>
94     * Has <b> OK </b> status if method returns a value that equals to
95     * corresponding object relation.<p>
96     * The following method tests are to be completed successfully before :
97     * <ul>
98     *  <li> <code> setContainer() </code> : sets container for the object</li>
99     * </ul>
100     */
_getContainer()101     public void _getContainer() {
102         requiredMethod( "setContainer()");
103         oObj.getContainer();
104         tRes.tested("getContainer()", Status.skipped(true) );
105     }
106 
107     /**
108     * Test calls the method, then checks returned sequence.<p>
109     * Has <b> OK </b> status if returned sequence is not null.<p>
110     */
_getControls()111     public void _getControls() {
112         oObj.getControls();
113         tRes.tested("getControls()", Status.skipped(true) );
114     }
115 
116     /**
117     * Test calls the method. <p>
118     * Has <b> OK </b> status if the method successfully returns
119     * and no exceptions were thrown. <p>
120     */
_autoTabOrder()121     public void _autoTabOrder() {
122         oObj.autoTabOrder();
123         tRes.tested("autoTabOrder()", Status.skipped(true));
124     }
125 
126     /**
127     * Test calls the method. <p>
128     * Has <b> OK </b> status if the method successfully returns
129     * and no exceptions were thrown. <p>
130     */
_activateTabOrder()131     public void _activateTabOrder() {
132         oObj.activateTabOrder();
133         tRes.tested("activateTabOrder()", Status.skipped(true));
134     }
135 
136     /**
137     * Test calls the method. <p>
138     * Has <b> OK </b> status if the method successfully returns
139     * and no exceptions were thrown. <p>
140     */
_activateFirst()141     public void _activateFirst() {
142         oObj.activateFirst();
143         tRes.tested("activateFirst()", Status.skipped(true));
144     }
145 
146     /**
147     * Test calls the method. <p>
148     * Has <b> OK </b> status if the method successfully returns
149     * and no exceptions were thrown. <p>
150     */
_activateLast()151     public void _activateLast() {
152         oObj.activateLast();
153         tRes.tested("activateLast()", Status.skipped(true));
154     }
155 }
156 
157