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;
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
40 public void _addRanges() {
42 tRes
.tested("addRanges()",Status
.skipped(true));
45 oObj
.addRanges(new CellRangeAddress
[] {address
});
46 tRes
.tested("addRanges()", true);
49 public void _apply() {
50 requiredMethod("addRanges()");
52 tRes
.tested("apply()",Status
.skipped(true));
56 tRes
.tested("apply()", true);
59 public void _getIsScenario() {
60 requiredMethod("apply()");
62 tRes
.tested("getIsScenario()",Status
.skipped(true));
65 boolean getIs
= oObj
.getIsScenario();
66 tRes
.tested("getIsScenario()", getIs
);
69 public void _getScenarioComment() {
71 tRes
.tested("getScenarioComment()",Status
.skipped(true));
74 comment
= oObj
.getScenarioComment();
75 tRes
.tested("getScenarioComment()", true);
78 public void _setScenarioComment() {
79 requiredMethod("getScenarioComment()");
81 tRes
.tested("setScenarioComment()",Status
.skipped(true));
85 oObj
.setScenarioComment("MyComment");
86 String c
= oObj
.getScenarioComment();
87 res
= c
.equals("MyComment");
88 oObj
.setScenarioComment(comment
);
89 tRes
.tested("setScenarioComment()", res
);