Branch libreoffice-5-0-4
[LibreOffice.git] / qadevOOo / tests / java / ifc / sheet / _XViewSplitable.java
blobc70719babe5300162953e90b5850f3ec311b44ab
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package ifc.sheet;
21 import lib.MultiMethodTest;
23 import com.sun.star.sheet.XViewSplitable;
25 /**
26 * Testing <code>com.sun.star.sheet.XViewSplitable</code>
27 * interface methods :
28 * <ul>
29 * <li><code> getIsWindowSplit()</code></li>
30 * <li><code> getSplitHorizontal()</code></li>
31 * <li><code> getSplitVertical()</code></li>
32 * <li><code> getSplitColumn()</code></li>
33 * <li><code> getSplitRow()</code></li>
34 * <li><code> splitAtPosition()</code></li>
35 * </ul> <p>
36 * @see com.sun.star.sheet.XViewSplitable
38 public class _XViewSplitable extends MultiMethodTest {
40 public XViewSplitable oObj = null;
41 protected static final int posX = 101, posY = 51;
43 /**
44 * Test just calls the method. <p>
45 * Has <b> OK </b> status if the method successfully returns. <p>
47 public void _splitAtPosition(){
48 oObj.splitAtPosition(posX, posY);
49 tRes.tested("splitAtPosition()", true);
52 /**
53 * Test calls the method and checks returned value. <p>
54 * Has <b> OK </b> status if returned value is equal to true. <p>
55 * The following method tests are to be completed successfully before :
56 * <ul>
57 * <li> <code> splitAtPosition() </code> : that the view was splitted into
58 * individual panes </li>
59 * </ul>
61 public void _getIsWindowSplit(){
62 requiredMethod("splitAtPosition()");
63 tRes.tested("getIsWindowSplit()", oObj.getIsWindowSplit());
66 /**
67 * Test calls the method and compares returned value with value that was
68 * set by method <code>splitAtPosition()</code>. <p>
69 * Has <b> OK </b> status if returned value is equal to value that was
70 * set by method <code>splitAtPosition()</code>. <p>
71 * The following method tests are to be completed successfully before :
72 * <ul>
73 * <li> <code> splitAtPosition() </code> : to split the view at the
74 * specified position </li>
75 * </ul>
77 public void _getSplitHorizontal() {
78 requiredMethod("splitAtPosition()");
79 tRes.tested("getSplitHorizontal()", oObj.getSplitHorizontal() == posX);
82 /**
83 * Test calls the method and compares returned value with value that was
84 * set by method <code>splitAtPosition()</code>. <p>
85 * Has <b> OK </b> status if returned value is equal to value that was
86 * set by method <code>splitAtPosition()</code>. <p>
87 * The following method tests are to be completed successfully before :
88 * <ul>
89 * <li> <code> splitAtPosition() </code> : to split the view at the
90 * specified position </li>
91 * </ul>
93 public void _getSplitVertical() {
94 requiredMethod("splitAtPosition()");
95 tRes.tested("getSplitVertical()", oObj.getSplitVertical() == posY);
98 /**
99 * Test calls the method and checks returned value. <p>
100 * Has <b> OK </b> status if returned value isn't equal zero. <p>
101 * The following method tests are to be completed successfully before :
102 * <ul>
103 * <li> <code> splitAtPosition() </code> : to split the view at the
104 * specified position </li>
105 * </ul>
107 public void _getSplitColumn() {
108 requiredMethod("splitAtPosition()");
109 tRes.tested("getSplitColumn()", oObj.getSplitColumn() != 0);
113 * Test calls the method and checks returned value. <p>
114 * Has <b> OK </b> status if returned value isn't equal zero. <p>
115 * The following method tests are to be completed successfully before :
116 * <ul>
117 * <li> <code> splitAtPosition() </code> : to split the view at the
118 * specified position </li>
119 * </ul>
121 public void _getSplitRow() {
122 requiredMethod("splitAtPosition()");
123 tRes.tested("getSplitRow()", oObj.getSplitRow() != 0);
125 } // finish class _XViewSplitable