1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: _XViewSplitable.java,v $
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 ************************************************************************/
33 import lib
.MultiMethodTest
;
35 import com
.sun
.star
.sheet
.XViewSplitable
;
38 * Testing <code>com.sun.star.sheet.XViewSplitable</code>
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>
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;
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);
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 :
69 * <li> <code> splitAtPosition() </code> : that the view was splitted into
70 * individual panes </li>
73 public void _getIsWindowSplit(){
74 requiredMethod("splitAtPosition()");
75 tRes
.tested("getIsWindowSplit()", oObj
.getIsWindowSplit());
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 :
85 * <li> <code> splitAtPosition() </code> : to split the view at the
86 * specified position </li>
89 public void _getSplitHorizontal() {
90 requiredMethod("splitAtPosition()");
91 tRes
.tested("getSplitHorizontal()", oObj
.getSplitHorizontal() == posX
);
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 :
101 * <li> <code> splitAtPosition() </code> : to split the view at the
102 * specified position </li>
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 :
115 * <li> <code> splitAtPosition() </code> : to split the view at the
116 * specified position </li>
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 :
129 * <li> <code> splitAtPosition() </code> : to split the view at the
130 * specified position </li>
133 public void _getSplitRow() {
134 requiredMethod("splitAtPosition()");
135 tRes
.tested("getSplitRow()", oObj
.getSplitRow() != 0);
137 } // finish class _XViewSplitable