merge the formfield patch from ooo-build
[ooovba.git] / qadevOOo / tests / java / ifc / sheet / _XViewSplitable.java
blobe07915da8fe9644ef0dc3244f0b08fe9153eab52
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _XViewSplitable.java,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 package ifc.sheet;
33 import lib.MultiMethodTest;
35 import com.sun.star.sheet.XViewSplitable;
37 /**
38 * Testing <code>com.sun.star.sheet.XViewSplitable</code>
39 * interface methods :
40 * <ul>
41 * <li><code> getIsWindowSplit()</code></li>
42 * <li><code> getSplitHorizontal()</code></li>
43 * <li><code> getSplitVertical()</code></li>
44 * <li><code> getSplitColumn()</code></li>
45 * <li><code> getSplitRow()</code></li>
46 * <li><code> splitAtPosition()</code></li>
47 * </ul> <p>
48 * @see com.sun.star.sheet.XViewSplitable
50 public class _XViewSplitable extends MultiMethodTest {
52 public XViewSplitable oObj = null;
53 protected final int posX = 101, posY = 51;
55 /**
56 * Test just calls the method. <p>
57 * Has <b> OK </b> status if the method successfully returns. <p>
59 public void _splitAtPosition(){
60 oObj.splitAtPosition(posX, posY);
61 tRes.tested("splitAtPosition()", true);
64 /**
65 * Test calls the method and checks returned value. <p>
66 * Has <b> OK </b> status if returned value is equal to true. <p>
67 * The following method tests are to be completed successfully before :
68 * <ul>
69 * <li> <code> splitAtPosition() </code> : that the view was splitted into
70 * individual panes </li>
71 * </ul>
73 public void _getIsWindowSplit(){
74 requiredMethod("splitAtPosition()");
75 tRes.tested("getIsWindowSplit()", oObj.getIsWindowSplit());
78 /**
79 * Test calls the method and compares returned value with value that was
80 * set by method <code>splitAtPosition()</code>. <p>
81 * Has <b> OK </b> status if returned value is equal to value that was
82 * set by method <code>splitAtPosition()</code>. <p>
83 * The following method tests are to be completed successfully before :
84 * <ul>
85 * <li> <code> splitAtPosition() </code> : to split the view at the
86 * specified position </li>
87 * </ul>
89 public void _getSplitHorizontal() {
90 requiredMethod("splitAtPosition()");
91 tRes.tested("getSplitHorizontal()", oObj.getSplitHorizontal() == posX);
94 /**
95 * Test calls the method and compares returned value with value that was
96 * set by method <code>splitAtPosition()</code>. <p>
97 * Has <b> OK </b> status if returned value is equal to value that was
98 * set by method <code>splitAtPosition()</code>. <p>
99 * The following method tests are to be completed successfully before :
100 * <ul>
101 * <li> <code> splitAtPosition() </code> : to split the view at the
102 * specified position </li>
103 * </ul>
105 public void _getSplitVertical() {
106 requiredMethod("splitAtPosition()");
107 tRes.tested("getSplitVertical()", oObj.getSplitVertical() == posY);
111 * Test calls the method and checks returned value. <p>
112 * Has <b> OK </b> status if returned value isn't equal zero. <p>
113 * The following method tests are to be completed successfully before :
114 * <ul>
115 * <li> <code> splitAtPosition() </code> : to split the view at the
116 * specified position </li>
117 * </ul>
119 public void _getSplitColumn() {
120 requiredMethod("splitAtPosition()");
121 tRes.tested("getSplitColumn()", oObj.getSplitColumn() != 0);
125 * Test calls the method and checks returned value. <p>
126 * Has <b> OK </b> status if returned value isn't equal zero. <p>
127 * The following method tests are to be completed successfully before :
128 * <ul>
129 * <li> <code> splitAtPosition() </code> : to split the view at the
130 * specified position </li>
131 * </ul>
133 public void _getSplitRow() {
134 requiredMethod("splitAtPosition()");
135 tRes.tested("getSplitRow()", oObj.getSplitRow() != 0);
137 } // finish class _XViewSplitable