diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-23 15:21:41 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-23 15:21:41 +0200 |
commit | 1b12b332a9ff0c44b19f7f4f0c76b3f8ee534fc7 (patch) | |
tree | f951731fcd4f0c17dd7a55b154be238cb2b71bae /qadevOOo/tests/java/ifc/beans/_XPropertyAccess.java | |
parent | 42e0579442c805df41454461d17cdede43c47b6a (diff) |
recreated tag libreoffice-3.3.3.1 which had these commits:
commit aec86c5680a68c65de8537b8a83a16e8d90cfdd9 (tag: refs/tags/libreoffice-3.3.3.1)
Author: Petr Mladek <pmladek@suse.cz>
Date: Tue May 31 17:39:08 2011 +0200
Version 3.3.3.1, tag libreoffice-3.3.3.1 (3.3.3-rc1)
Notes
Notes:
split repo tag: testing_libreoffice-3.3.3.1
split repo tag: testing_libreoffice-3.3.4.1
Diffstat (limited to 'qadevOOo/tests/java/ifc/beans/_XPropertyAccess.java')
-rw-r--r-- | qadevOOo/tests/java/ifc/beans/_XPropertyAccess.java | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertyAccess.java b/qadevOOo/tests/java/ifc/beans/_XPropertyAccess.java index 37b835431b8d..3a6de40053cc 100644 --- a/qadevOOo/tests/java/ifc/beans/_XPropertyAccess.java +++ b/qadevOOo/tests/java/ifc/beans/_XPropertyAccess.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,12 +46,12 @@ import lib.StatusException; * @see com.sun.star.beans.XPropertyAccess */ public class _XPropertyAccess extends MultiMethodTest { - + /** * oObj filled by MultiMethodTest */ public XPropertyAccess oObj = null;// oObj filled by MultiMethodTest - + /** * object relation X<CODE>PropertyAccess.propertyToChange</CODE><br> * This relation must be filled from the module. It contains a property which must @@ -59,7 +59,7 @@ public class _XPropertyAccess extends MultiMethodTest { * <CODE>setPropertyValues()</CODE> */ public PropertyValue propertyToChange = null; - + /** * checks if the object relation <CODE>XPropertyAccess.propertyToChange</CODE> * is available @@ -70,18 +70,18 @@ public class _XPropertyAccess extends MultiMethodTest { throw new StatusException(Status.failed("Object raltion 'XPropertyAccess.propertyToChange' is null")); } } - + /** * Test calls the method and checks if the returned sequenze contanis a propterty which is named * in the object relation <code>XPropertyAccess.propertyToChange</code>. */ public void _getPropertyValues() { PropertyValue[] properties = oObj.getPropertyValues(); - + boolean ok = true; - + if (properties != null){ - + boolean found = false; for (int i=0; i < properties.length; i++){ if (properties[i].Name.equals(propertyToChange.Name)) found = true; @@ -90,16 +90,16 @@ public class _XPropertyAccess extends MultiMethodTest { log.println("ERROR: could not find desired property '"+ propertyToChange.Name+"'"); ok=false; } - + } else { log.println("ERROR: the method returned NULL"); ok =false; } - + tRes.tested("getPropertyValues()", ok ); return; } - + /** * Test calls the method and checks if: * <ul> @@ -112,18 +112,18 @@ public class _XPropertyAccess extends MultiMethodTest { * </ul> */ public void _setPropertyValues(){ - + boolean ok = true; boolean test = true; boolean exp = false; - + try { PropertyValue[] newProps = new PropertyValue[1]; newProps[0] = propertyToChange; - + log.println("try to set property vlaues given by object relation 'XPropertyAccess.propertyToChange'..."); oObj.setPropertyValues(newProps); - + } catch (UnknownPropertyException ex) { log.println("ERROR: Exception was thrown while trying to set property value: " + ex.toString()); @@ -141,11 +141,11 @@ public class _XPropertyAccess extends MultiMethodTest { ex.toString()); test = false; } - + if ( test){ log.println("... OK"); } - + ok &= test; test = false; exp = false; @@ -176,29 +176,29 @@ public class _XPropertyAccess extends MultiMethodTest { ex.toString()); exp = true; } - + if (! exp){ log.println("FAILED: expected exception 'UnknownPropertyException' was not thrown"); } else { if (test) log.println("... OK"); } - + ok &= test; test = false; exp = false; try { - + log.println("try to set values with invalid property name. " + "Expect 'com.sun.star.beans.UnknownPropertyException'..."); - + PropertyValue[] newProps = new PropertyValue[1]; PropertyValue newProp = new PropertyValue(); newProp.Name = "XPropertyAccess.InvalidPropertyName"; newProp.Value = "invalid property"; newProps[0] = newProp; - + oObj.setPropertyValues(newProps); - + } catch (WrappedTargetException ex) { log.println("ERROR: unexptected exception was thrown while trying to set invalid value: " + ex.toString()); @@ -217,20 +217,20 @@ public class _XPropertyAccess extends MultiMethodTest { exp = true; test = true; } - + ok &= test; - + if (! exp){ log.println("FAILED: expected exception 'UnknownPropertyException' was not thrown"); } else { if (test) log.println("... OK"); } - + tRes.tested("setPropertyValues()", ok); return; - + } - + } /// finish class XPropertyAccess |