bump product version to 4.2.0.1
[LibreOffice.git] / qadevOOo / tests / java / ifc / drawing / _LineProperties.java
blob6944b103b0d58c1a4213c53645f5f909c2e9366e
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.drawing;
21 import com.sun.star.drawing.LineDash;
22 import lib.MultiPropertyTest;
24 /**
25 * Testing <code>com.sun.star.drawing.LineProperties</code>
26 * service properties :
27 * <ul>
28 * <li><code> LineStyle</code></li>
29 * <li><code> LineDash</code></li>
30 * <li><code> LineColor</code></li>
31 * <li><code> LineTransparence</code></li>
32 * <li><code> LineWidth</code></li>
33 * <li><code> LineJoint</code></li>
34 * <li><code> LineStartName</code></li>
35 * <li><code> LineStart</code></li>
36 * <li><code> LineEnd</code></li>
37 * <li><code> LineStartCenter</code></li>
38 * <li><code> LineStartWidth</code></li>
39 * <li><code> LineEndCenter</code></li>
40 * <li><code> LineEndWidth</code></li>
41 * </ul> <p>
42 * Properties testing is automated by <code>lib.MultiPropertyTest</code>.
43 * @see com.sun.star.drawing.LineProperties
45 public class _LineProperties extends MultiPropertyTest {
47 /**
48 * Tester used for property LineStartName which can have
49 * only predefined String values.
51 protected PropertyTester LineTester = new PropertyTester() {
52 protected Object getNewValue(String propName, Object oldValue)
53 throws java.lang.IllegalArgumentException {
54 if (oldValue.equals("Arrow"))
55 return "Square"; else
56 return "Arrow";
58 } ;
60 /**
61 * The property switched between 'Square' and 'Arrow' values.
63 public void _LineStartName() {
64 log.println("Testing with custom Property tester");
65 testProperty("LineStartName", LineTester) ;
68 public void _LineDash() {
69 LineDash aLineDash = new LineDash();
70 LineDash aLineDash2 = new LineDash();
71 aLineDash.DashLen = 5;
72 aLineDash2.DashLen = 1;
73 testProperty("LineDash",aLineDash,aLineDash2);