1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 package ifc.awt;
29 
30 import lib.MultiMethodTest;
31 import lib.Status;
32 
33 import com.sun.star.awt.XControl;
34 import com.sun.star.awt.XControlContainer;
35 import com.sun.star.awt.XTabController;
36 import com.sun.star.awt.XTabControllerModel;
37 
38 /**
39 * This interface is DEPRECATED !!!
40 * All test results are SKIPPED.OK now.
41 * Testing <code>com.sun.star.awt.XTabController</code>
42 * interface methods :
43 * <ul>
44 *  <li><code> activateFirst()</code></li>
45 *  <li><code> activateLast()</code></li>
46 *  <li><code> activateTabOrder()</code></li>
47 *  <li><code> autoTabOrder()</code></li>
48 *  <li><code> getContainer()</code></li>
49 *  <li><code> getCotrols()</code></li>
50 *  <li><code> getModel()</code></li>
51 *  <li><code> setContainer()</code></li>
52 *  <li><code> setModel()</code></li>
53 * </ul><p>
54 * This test needs the following object relations :
55 * <ul>
56 *  <li> <code>'MODEL'</code> : <code>XTabControllerModel</code> a model for
57 *   the object</li>
58 *  <li> <code>'CONTAINER'</code> : <code>XControlContainer</code> a container
59 *   for the object</li>
60 * <ul> <p>
61 * @see com.sun.star.awt.XTabController
62 */
63 public class _XTabController extends MultiMethodTest {
64     public XTabController oObj = null;
65 
66     /**
67     * Test calls the method with object relation 'MODEL' as a parameter.<p>
68     * Has <b> OK </b> status if the method successfully returns
69     * and no exceptions were thrown. <p>
70     */
71     public void _setModel() {
72         oObj.setModel( (XTabControllerModel) tEnv.getObjRelation("MODEL"));
73         tRes.tested("setModel()", Status.skipped(true) );
74     }
75 
76     /**
77     * Test calls the method, then checks returned value.<p>
78     * Has <b> OK </b> status if method returns a value that equals to
79     * corresponding object relation.<p>
80     * The following method tests are to be completed successfully before :
81     * <ul>
82     *  <li> <code> setModel() </code> : sets model for the object </li>
83     * </ul>
84     */
85     public void _getModel() {
86         requiredMethod("setModel()");
87         XTabControllerModel setModel = oObj.getModel();
88         tRes.tested("getModel()", Status.skipped(true));
89     }
90 
91     /**
92     * Test calls the method with object relation 'CONTAINER' as a parameter.<p>
93     * Has <b> OK </b> status if the method successfully returns
94     * and no exceptions were thrown. <p>
95     */
96     public void _setContainer() {
97         oObj.setContainer( (XControlContainer)
98             tEnv.getObjRelation("CONTAINER"));
99         tRes.tested("setContainer()", Status.skipped(true));
100     }
101 
102     /**
103     * Test calls the method, then checks returned value.<p>
104     * Has <b> OK </b> status if method returns a value that equals to
105     * corresponding object relation.<p>
106     * The following method tests are to be completed successfully before :
107     * <ul>
108     *  <li> <code> setContainer() </code> : sets container for the object</li>
109     * </ul>
110     */
111     public void _getContainer() {
112         requiredMethod( "setContainer()");
113         XControlContainer setContainer = oObj.getContainer();
114         XControlContainer relContainer = (XControlContainer )
115                                             tEnv.getObjRelation("CONTAINER");
116         tRes.tested("getContainer()", Status.skipped(true) );
117     }
118 
119     /**
120     * Test calls the method, then checks returned sequence.<p>
121     * Has <b> OK </b> status if returned sequence is not null.<p>
122     */
123     public void _getControls() {
124         XControl[] aControl = oObj.getControls();
125         tRes.tested("getControls()", Status.skipped(true) );
126     }
127 
128     /**
129     * Test calls the method. <p>
130     * Has <b> OK </b> status if the method successfully returns
131     * and no exceptions were thrown. <p>
132     */
133     public void _autoTabOrder() {
134         oObj.autoTabOrder();
135         tRes.tested("autoTabOrder()", Status.skipped(true));
136     }
137 
138     /**
139     * Test calls the method. <p>
140     * Has <b> OK </b> status if the method successfully returns
141     * and no exceptions were thrown. <p>
142     */
143     public void _activateTabOrder() {
144         oObj.activateTabOrder();
145         tRes.tested("activateTabOrder()", Status.skipped(true));
146     }
147 
148     /**
149     * Test calls the method. <p>
150     * Has <b> OK </b> status if the method successfully returns
151     * and no exceptions were thrown. <p>
152     */
153     public void _activateFirst() {
154         oObj.activateFirst();
155         tRes.tested("activateFirst()", Status.skipped(true));
156     }
157 
158     /**
159     * Test calls the method. <p>
160     * Has <b> OK </b> status if the method successfully returns
161     * and no exceptions were thrown. <p>
162     */
163     public void _activateLast() {
164         oObj.activateLast();
165         tRes.tested("activateLast()", Status.skipped(true));
166     }
167 }
168 
169