bump product version to 4.2.0.1
[LibreOffice.git] / qadevOOo / tests / java / ifc / drawing / _AreaShapeDescriptor.java
blobca8b166c5bbea3b1b5b72fc7bbc6bf3a3d9ec8fa
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 lib.MultiPropertyTest;
23 public class _AreaShapeDescriptor extends MultiPropertyTest {
25 protected boolean compare(Object ob1, Object ob2) {
27 return super.compare(ob1, ob2);
31 protected PropertyTester URLTester = new PropertyTester() {
32 protected Object getNewValue(String propName, Object oldValue)
33 throws java.lang.IllegalArgumentException {
34 if (oldValue.equals(util.utils.getFullTestURL("space-metal.jpg")))
35 return util.utils.getFullTestURL("crazy-blue.jpg"); else
36 return util.utils.getFullTestURL("space-metal.jpg");
38 } ;
40 protected PropertyTester StringTester = new PropertyTester() {
41 protected Object getNewValue(String propName, Object oldValue)
42 throws java.lang.IllegalArgumentException {
43 if (oldValue.equals(str1))
44 return str2; else
45 return str1;
47 } ;
49 public void _FillBitmapURL() {
50 log.println("Testing with custom Property tester") ;
51 testProperty("FillBitmapURL", URLTester) ;
54 public String str1 = "";
55 public String str2 = "";
57 public void _FillGradientName() {
58 log.println("Testing with custom Property tester") ;
59 str1 = "Gradient 1";
60 str2 = "Gradient 3";
61 testProperty("FillGradientName", StringTester) ;
64 public void _FillBitmapName() {
65 log.println("Testing with custom Property tester") ;
66 str1 = "Sky";
67 str2 = "Blank";
68 testProperty("FillBitmapName", StringTester) ;
71 public void _FillTransparenceGradientName() {
72 log.println("Testing with custom Property tester") ;
73 str1 = "Standard 1";
74 str2 = "Standard 2";
75 testProperty("FillTransparenceGradientName", StringTester) ;
78 public void _FillHatchName() {
79 log.println("Testing with custom Property tester") ;
80 str1 = "Black 0 degrees";
81 str2 = "Black 45 degrees";
82 testProperty("FillHatchName", StringTester) ;
85 public void _FillBitmapMode() {
86 log.println("Testing with custom Property tester") ;
87 try {
88 Object getting = oObj.getPropertyValue("FillBitmapMode");
89 if (! (getting instanceof com.sun.star.drawing.BitmapMode)) {
90 log.println("getting the property 'FillBitmapMode'");
91 log.println("return "+ oObj.getClass().getName());
92 log.println("Expected was 'com.sun.star.drawing.BitmapMode'");
93 tRes.tested("FillBitmapMode",false);
94 } else testProperty("FillBitmapMode");
96 catch (Exception ex) {
97 log.println("Exception while checking 'FillBitmapMode'");
98 ex.printStackTrace(log);
99 tRes.tested("FillBitmapMode",false);