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: _XTableChart.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
;
34 import util
.ValueComparer
;
36 import com
.sun
.star
.table
.CellRangeAddress
;
37 import com
.sun
.star
.table
.XTableChart
;
40 * Testing <code>com.sun.star.table.XTableChart</code>
43 * <li><code> getHasColumnHeaders()</code></li>
44 * <li><code> setHasColumnHeaders()</code></li>
45 * <li><code> getHasRowHeaders()</code></li>
46 * <li><code> setHasRowHeaders()</code></li>
47 * <li><code> getRanges()</code></li>
48 * <li><code> setRanges()</code></li>
50 * Test is <b> NOT </b> multithread compilant. <p>
51 * @see com.sun.star.table.XTableChart
53 public class _XTableChart
extends MultiMethodTest
{
55 public XTableChart oObj
= null;
58 * Sets the property to <code>false</code> and then check it. <p>
59 * Has <b> OK </b> status if the method returns <code>false</code>. <p>
61 public void _getHasColumnHeaders() {
62 oObj
.setHasColumnHeaders(false);
63 tRes
.tested("getHasColumnHeaders()", !oObj
.getHasColumnHeaders() );
64 } // getHasColumnHeaders()
67 * Sets the property to <code>true</code> and then check it. <p>
68 * Has <b> OK </b> status if the method returns <code>true</code>. <p>
70 public void _setHasColumnHeaders() {
71 oObj
.setHasColumnHeaders(true);
72 tRes
.tested("setHasColumnHeaders()", oObj
.getHasColumnHeaders() );
73 } // setHasColumnHeaders()
76 * Sets the property to <code>false</code> and then check it. <p>
77 * Has <b> OK </b> status if the method returns <code>false</code>. <p>
79 public void _getHasRowHeaders() {
80 oObj
.setHasRowHeaders(false);
81 tRes
.tested("getHasRowHeaders()", !oObj
.getHasRowHeaders() );
82 } // getHasRowHeaders()
85 * Sets the property to <code>true</code> and then check it. <p>
86 * Has <b> OK </b> status if the method returns <code>true</code>. <p>
88 public void _setHasRowHeaders() {
89 oObj
.setHasRowHeaders(true);
90 tRes
.tested("setHasRowHeaders()", oObj
.getHasRowHeaders() );
91 } // setHasRowHeaders()
93 CellRangeAddress
[] the_Ranges
= null;
96 * Test calls the method and stores the range returned. <p>
97 * Has <b> OK </b> status if the method returns not
98 * <code>null</code> valuie. <p>
100 public void _getRanges() {
101 the_Ranges
= oObj
.getRanges();
102 tRes
.tested("getRanges()", the_Ranges
!= null );
106 * Changes the first range in range array obtained by
107 * <code>getRanges</code> method, then set changed array. <p>
108 * Has <b> OK </b> status if range array get is the same as was
110 * The following method tests are to be completed successfully before :
112 * <li> <code> getRanges() </code> : to have initial ranges </li>
115 public void _setRanges() {
116 requiredMethod("getRanges()");
117 CellRangeAddress
[] tmpRanges
= oObj
.getRanges();
118 tmpRanges
[0].EndRow
= 1;
119 oObj
.setRanges(tmpRanges
);
120 tRes
.tested("setRanges()", ValueComparer
.equalValue(
121 tmpRanges
,oObj
.getRanges()));
122 oObj
.setRanges(the_Ranges
);
125 } // finish class _XTableChartsSupplier