Branch libreoffice-5-0-4
[LibreOffice.git] / qadevOOo / tests / java / ifc / table / _XTableChart.java
blobd6efc526505011082e9c7fbab850af4aa916c3ad
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.table;
21 import lib.MultiMethodTest;
22 import util.ValueComparer;
24 import com.sun.star.table.CellRangeAddress;
25 import com.sun.star.table.XTableChart;
27 /**
28 * Testing <code>com.sun.star.table.XTableChart</code>
29 * interface methods :
30 * <ul>
31 * <li><code> getHasColumnHeaders()</code></li>
32 * <li><code> setHasColumnHeaders()</code></li>
33 * <li><code> getHasRowHeaders()</code></li>
34 * <li><code> setHasRowHeaders()</code></li>
35 * <li><code> getRanges()</code></li>
36 * <li><code> setRanges()</code></li>
37 * </ul> <p>
38 * Test is <b> NOT </b> multithread compliant. <p>
39 * @see com.sun.star.table.XTableChart
41 public class _XTableChart extends MultiMethodTest {
43 public XTableChart oObj = null;
45 /**
46 * Sets the property to <code>false</code> and then check it. <p>
47 * Has <b> OK </b> status if the method returns <code>false</code>. <p>
49 public void _getHasColumnHeaders() {
50 oObj.setHasColumnHeaders(false);
51 tRes.tested("getHasColumnHeaders()", !oObj.getHasColumnHeaders() );
52 } // getHasColumnHeaders()
54 /**
55 * Sets the property to <code>true</code> and then check it. <p>
56 * Has <b> OK </b> status if the method returns <code>true</code>. <p>
58 public void _setHasColumnHeaders() {
59 oObj.setHasColumnHeaders(true);
60 tRes.tested("setHasColumnHeaders()", oObj.getHasColumnHeaders() );
61 } // setHasColumnHeaders()
63 /**
64 * Sets the property to <code>false</code> and then check it. <p>
65 * Has <b> OK </b> status if the method returns <code>false</code>. <p>
67 public void _getHasRowHeaders() {
68 oObj.setHasRowHeaders(false);
69 tRes.tested("getHasRowHeaders()", !oObj.getHasRowHeaders() );
70 } // getHasRowHeaders()
72 /**
73 * Sets the property to <code>true</code> and then check it. <p>
74 * Has <b> OK </b> status if the method returns <code>true</code>. <p>
76 public void _setHasRowHeaders() {
77 oObj.setHasRowHeaders(true);
78 tRes.tested("setHasRowHeaders()", oObj.getHasRowHeaders() );
79 } // setHasRowHeaders()
81 CellRangeAddress[] the_Ranges = null;
83 /**
84 * Test calls the method and stores the range returned. <p>
85 * Has <b> OK </b> status if the method returns not
86 * <code>null</code> valuie. <p>
88 public void _getRanges() {
89 the_Ranges = oObj.getRanges();
90 tRes.tested("getRanges()", the_Ranges != null );
91 } // getRanges()
93 /**
94 * Changes the first range in range array obtained by
95 * <code>getRanges</code> method, then set changed array. <p>
96 * Has <b> OK </b> status if range array get is the same as was
97 * set. <p>
98 * The following method tests are to be completed successfully before :
99 * <ul>
100 * <li> <code> getRanges() </code> : to have initial ranges </li>
101 * </ul>
103 public void _setRanges() {
104 requiredMethod("getRanges()");
105 CellRangeAddress[] tmpRanges = oObj.getRanges();
106 tmpRanges[0].EndRow = 1;
107 oObj.setRanges(tmpRanges);
108 tRes.tested("setRanges()", ValueComparer.equalValue(
109 tmpRanges,oObj.getRanges()));
110 oObj.setRanges(the_Ranges);
111 } // getRanges()
113 } // finish class _XTableChartsSupplier