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 .
20 import com
.sun
.star
.sheet
.XScenario
;
21 import com
.sun
.star
.table
.CellRangeAddress
;
22 import lib
.MultiMethodTest
;
28 public class _XScenario
extends MultiMethodTest
{
29 public XScenario oObj
= null;
30 CellRangeAddress address
= null;
31 String comment
= null;
32 boolean skipTest
= false;
35 public void before() {
36 // testing a scenario containing the whole sheet does not make sense.
37 // test is skipped until this interface is implemented somewhere else
41 public void _addRanges() {
43 tRes
.tested("addRanges()",Status
.skipped(true));
46 oObj
.addRanges(new CellRangeAddress
[] {address
});
47 tRes
.tested("addRanges()", true);
50 public void _apply() {
51 requiredMethod("addRanges()");
53 tRes
.tested("apply()",Status
.skipped(true));
57 tRes
.tested("apply()", true);
60 public void _getIsScenario() {
61 requiredMethod("apply()");
63 tRes
.tested("getIsScenario()",Status
.skipped(true));
66 boolean getIs
= oObj
.getIsScenario();
67 tRes
.tested("getIsScenario()", getIs
);
70 public void _getScenarioComment() {
72 tRes
.tested("getScenarioComment()",Status
.skipped(true));
75 comment
= oObj
.getScenarioComment();
76 tRes
.tested("getScenarioComment()", true);
79 public void _setScenarioComment() {
80 requiredMethod("getScenarioComment()");
82 tRes
.tested("setScenarioComment()",Status
.skipped(true));
86 oObj
.setScenarioComment("MyComment");
87 String c
= oObj
.getScenarioComment();
88 res
= c
.equals("MyComment");
89 oObj
.setScenarioComment(comment
);
90 tRes
.tested("setScenarioComment()", res
);