diff options
author | sb <sb@openoffice.org> | 2010-02-12 14:51:00 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-02-12 14:51:00 +0100 |
commit | 75d11d8f2f10604b35c6b0fb4bb24660f32f8329 (patch) | |
tree | 8f18fe61853696ba045fa615fb82bf2000ddd4d6 /qadevOOo | |
parent | 5610f316cbbeb5757fd7d669445b3f190e7067e1 (diff) |
sb118: minor code cleanup
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/lib/TestEnvironment.java | 8 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java | 7 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/beans/_XPropertySet.java | 17 | ||||
-rwxr-xr-x | qadevOOo/tests/java/mod/_sw/CharacterStyle.java | 6 |
4 files changed, 16 insertions, 22 deletions
diff --git a/qadevOOo/runner/lib/TestEnvironment.java b/qadevOOo/runner/lib/TestEnvironment.java index 4ee280880cf3..02904701ab0c 100644 --- a/qadevOOo/runner/lib/TestEnvironment.java +++ b/qadevOOo/runner/lib/TestEnvironment.java @@ -41,23 +41,23 @@ import java.util.Hashtable; * @see TestCase */ -public class TestEnvironment { +public final class TestEnvironment { /** * Contains object relations - auxiliary objects associated with the * tested object and required for testing. */ - protected Hashtable relations = new Hashtable(10); + private final Hashtable relations = new Hashtable(10); /** * An instance of the tested implementation object. */ - protected XInterface testObject; + private final XInterface testObject; /** * Indicates that the testObject is in invalid state and should notbe * used for testing anymore. */ - protected boolean disposed = false; + private boolean disposed = false; /** * A reference to TestCase which has created the test environment. diff --git a/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java b/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java index 4e9ca6ba136a..38094ba3ded0 100644 --- a/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java +++ b/qadevOOo/tests/java/ifc/beans/_XMultiPropertyStates.java @@ -58,9 +58,8 @@ public class _XMultiPropertyStates extends MultiMethodTest { public XMultiPropertyStates oObj = null; - Object[] defaults = null; - PropertyState[] states = null; - String[] names = null; + private PropertyState[] states = null; + private String[] names = null; public void before() { names = (String[]) tEnv.getObjRelation("PropertyNames"); @@ -86,7 +85,7 @@ public class _XMultiPropertyStates extends MultiMethodTest { public void _getPropertyDefaults() { boolean result = false; try { - defaults = oObj.getPropertyDefaults(names); + Object[] defaults = oObj.getPropertyDefaults(names); result = (defaults != null) && defaults.length == names.length; log.println("Number of default values: " + defaults.length); } catch (com.sun.star.beans.UnknownPropertyException e) { diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java index a4720858f474..ccfd1db3ecf5 100644 --- a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java +++ b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java @@ -67,7 +67,7 @@ public class _XPropertySet extends MultiMethodTest { /** * Flag that indicates change listener was called. */ - boolean propertyChanged = false; + private boolean propertyChanged = false; /** * Listener that must be called on bound property changing. @@ -82,12 +82,12 @@ public class _XPropertySet extends MultiMethodTest { public void disposing (EventObject obj) {} }; - XPropertyChangeListener PClistener = new MyChangeListener(); + private final XPropertyChangeListener PClistener = new MyChangeListener(); /** * Flag that indicates veto listener was called. */ - boolean vetoableChanged = false; + private boolean vetoableChanged = false; /** * Listener that must be called on constrained property changing. @@ -102,19 +102,19 @@ public class _XPropertySet extends MultiMethodTest { public void disposing (EventObject obj) {} }; - XVetoableChangeListener VClistener = new MyVetoListener(); + private final XVetoableChangeListener VClistener = new MyVetoListener(); /** * Structure that collects three properties of each type to test : * Constrained, Bound and Normal. */ - public class PropsToTest { + private final class PropsToTest { String constrained = null; String bound = null; String normal = null; } - PropsToTest PTT = new PropsToTest(); + private final PropsToTest PTT = new PropsToTest(); /** * Tests method <code>getPropertySetInfo</code>. After test completed @@ -473,7 +473,7 @@ public class _XPropertySet extends MultiMethodTest { * Gets the properties being tested. Searches and stores by one * property of each kind (Bound, Vetoable, Normal). */ - public PropsToTest getPropsToTest(XPropertySetInfo xPSI) { + public void getPropsToTest(XPropertySetInfo xPSI) { Property[] properties = xPSI.getProperties(); String bound = ""; @@ -547,9 +547,6 @@ public class _XPropertySet extends MultiMethodTest { //get a random normal property PTT.normal=getRandomString(normal); - - return PTT; - } /** diff --git a/qadevOOo/tests/java/mod/_sw/CharacterStyle.java b/qadevOOo/tests/java/mod/_sw/CharacterStyle.java index 91ce4e8b09ad..2caab9671b39 100755 --- a/qadevOOo/tests/java/mod/_sw/CharacterStyle.java +++ b/qadevOOo/tests/java/mod/_sw/CharacterStyle.java @@ -58,15 +58,13 @@ import util.utils; * @see com.sun.star.style.CharacterStyle */ public class CharacterStyle extends TestCase { - - XTextDocument xTextDoc; - SOfficeFactory SOF = null; + private XTextDocument xTextDoc; /** * Creates text document. */ protected void initialize( TestParameters tParam, PrintWriter log ) { - SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF() ); + SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF() ); try { log.println( "creating a textdocument" ); xTextDoc = SOF.createTextDoc( null ); |