1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 package ifc.frame;
25 
26 import lib.MultiMethodTest;
27 
28 import com.sun.star.frame.XTasksSupplier;
29 
30 
31 /**
32 * Testing <code>com.sun.star.frame.XTasksSupplier</code>
33 * interface methods:
34 * <ul>
35 *  <li><code> getActiveTask() </code></li>
36 *  <li><code> getTasks() </code></li>
37 * </ul><p>
38 * Test is <b> NOT </b> multithread compilant. <p>
39 * @see com.sun.star.frame.XTasksSupplier
40 */
41 public class _XTasksSupplier extends MultiMethodTest {
42     public static XTasksSupplier oObj = null;
43 
44     /**
45     * DEPRECATED. <p>
46     * Has <b> OK </b> status .
47     */
_getActiveTask()48     public void _getActiveTask() {
49 //        XTask active = oObj.getActiveTask() ;
50 //        if (active == null)
51 //            log.println("There is no active task");
52 //        else
53 //            log.println("Active task: " + active.getName());
54         log.println("DEPRECATED");
55 
56         tRes.tested("getActiveTask()", true) ;
57     } // finished _getTasks()
58 
59     /**
60     * DEPRECATED. <p>
61     * Has <b> OK </b> status.
62     */
_getTasks()63     public void _getTasks() {
64 //        int cnt = 0 ;
65 //        boolean result = true ;
66 //        XTask task = null ;
67 //
68 //        XEnumerationAccess enumAcc = oObj.getTasks() ;
69 //        XEnumeration enum = enumAcc.createEnumeration() ;
70 //        while (enum.hasMoreElements()) {
71 //            cnt ++ ;
72 //            try {
73 //                task = (XTask) enum.nextElement() ;
74 //            } catch (com.sun.star.container.NoSuchElementException e) {
75 //                e.printStackTrace(log);
76 //            } catch (com.sun.star.lang.WrappedTargetException e) {
77 //                e.printStackTrace(log);
78 //            }
79 //            if (task == null)
80 //                log.println("" + cnt + " task: null !!!") ;
81 //            else
82 //                log.println("" + cnt + " task: " + task.getName()) ;
83 //            result &= (task != null) ;
84 //        }
85 //        log.println("Totaly tasks: " + cnt) ;
86 //
87 //        if (cnt > 0 && result) tRes.tested("getTasks()", true) ;
88 
89         log.println("DEPRECATED");
90 
91         tRes.tested("getTasks()", true);
92 
93     } // finished _removeResetListener()
94 
95 } // finished class _XTaskSupplier
96 
97