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.sheet;
25 
26 import lib.MultiMethodTest;
27 
28 import com.sun.star.sheet.XSheetConditionalEntry;
29 
30 /**
31 * Testing <code>com.sun.star.sheet.XSheetConditionalEntry</code>
32 * interface methods :
33 * <ul>
34 *  <li><code> getStyleName()</code></li>
35 *  <li><code> setStyleName()</code></li>
36 * </ul> <p>
37 * @see com.sun.star.sheet.XSheetConditionalEntry
38 */
39 public class _XSheetConditionalEntry extends MultiMethodTest {
40 
41     public XSheetConditionalEntry oObj = null;
42     public String StyleName = null;
43 
44     /**
45     * Test calls the method, stores and checks returned value. <p>
46     * Has <b> OK </b> status if returned value isn't null. <p>
47     */
_getStyleName()48     public void _getStyleName() {
49         StyleName = oObj.getStyleName();
50         tRes.tested("getStyleName()", StyleName != null);
51     }
52 
53     /**
54     * Test sets new value of style name, gets current style name and compares
55     * returned value with value that was stored by method <code>getStyleName()
56     * </code>. <p>
57     * Has <b> OK </b> status if values aren't equal. <p>
58     * The following method tests are to be completed successfully before :
59     * <ul>
60     *  <li> <code> getStyleName() </code> : to have current style name </li>
61     * </ul>
62     */
_setStyleName()63     public void _setStyleName() {
64         requiredMethod("getStyleName()");
65         oObj.setStyleName("Heading");
66         tRes.tested("setStyleName()", !StyleName.equals(oObj.getStyleName()));
67     }
68 
69 }  // finish class _XSheetConditionalEntry
70 
71 
72