bump product version to 4.2.0.1
[LibreOffice.git] / qadevOOo / tests / java / ifc / sheet / _XScenario.java
blob0c45d187f362713063ec9f390d5e35a5bf92bdd1
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 .
18 package ifc.sheet;
20 import com.sun.star.sheet.XScenario;
21 import com.sun.star.table.CellRangeAddress;
22 import lib.MultiMethodTest;
23 import lib.Status;
25 /**
28 public class _XScenario extends MultiMethodTest {
29 public XScenario oObj = null;
30 CellRangeAddress address = null;
31 String comment = null;
32 boolean skipTest = false;
34 public void before() {
35 // testing a scenario containing the whole sheet does not make sense.
36 // test is skipped until this interface is implemented somewhere else
37 skipTest = true;
40 public void _addRanges() {
41 if (skipTest) {
42 tRes.tested("addRanges()",Status.skipped(true));
43 return;
45 oObj.addRanges(new CellRangeAddress[] {address});
46 tRes.tested("addRanges()", true);
49 public void _apply() {
50 requiredMethod("addRanges()");
51 if (skipTest) {
52 tRes.tested("apply()",Status.skipped(true));
53 return;
55 oObj.apply();
56 tRes.tested("apply()", true);
59 public void _getIsScenario() {
60 requiredMethod("apply()");
61 if (skipTest) {
62 tRes.tested("getIsScenario()",Status.skipped(true));
63 return;
65 boolean getIs = oObj.getIsScenario();
66 tRes.tested("getIsScenario()", getIs);
69 public void _getScenarioComment() {
70 if (skipTest) {
71 tRes.tested("getScenarioComment()",Status.skipped(true));
72 return;
74 comment = oObj.getScenarioComment();
75 tRes.tested("getScenarioComment()", true);
78 public void _setScenarioComment() {
79 requiredMethod("getScenarioComment()");
80 if (skipTest) {
81 tRes.tested("setScenarioComment()",Status.skipped(true));
82 return;
84 boolean res = false;
85 oObj.setScenarioComment("MyComment");
86 String c = oObj.getScenarioComment();
87 res = c.equals("MyComment");
88 oObj.setScenarioComment(comment);
89 tRes.tested("setScenarioComment()", res);