diff --git a/qadevOOo/runner/lib/TestCase.java b/qadevOOo/runner/lib/TestCase.java index 0477ebef7c8c..a4895f13c4ce 100644 --- a/qadevOOo/runner/lib/TestCase.java +++ b/qadevOOo/runner/lib/TestCase.java @@ -19,8 +19,8 @@ package lib; import java.io.PrintWriter; - import lib.TestParameters; + /** * TestCase represent a factory for TestEnvironments * creation and disposing for a given implementation object. The @@ -49,9 +49,7 @@ public abstract class TestCase { /** * Specifies the PrintWriter to log information. */ - public PrintWriter log; - - //public static TestCase tCase; + protected PrintWriter log; /** * Sets the log to write information during testing. @@ -66,7 +64,7 @@ public abstract class TestCase { * * @param tParam test parameters. */ - public void initializeTestCase( TestParameters tParam ) { + public final void initializeTestCase( TestParameters tParam ) { initialize( tParam, log ); } @@ -89,7 +87,7 @@ public abstract class TestCase { * * @param tParam test parameters */ - public void cleanupTestCase( TestParameters tParam ) { + public final void cleanupTestCase( TestParameters tParam ) { cleanup( tParam, log ); } diff --git a/qadevOOo/runner/lib/TestEnvironment.java b/qadevOOo/runner/lib/TestEnvironment.java index 7c9b3d7cbe82..ba00770846a3 100644 --- a/qadevOOo/runner/lib/TestEnvironment.java +++ b/qadevOOo/runner/lib/TestEnvironment.java @@ -97,18 +97,6 @@ public final class TestEnvironment { return relations.get( name ); } - /** - * Checks if an auxiliary object has been registered with name - * - * @param name a name referencing an auxiliarx object - * - * @return true if the object has been associated, false - * otherwise. - */ - public boolean hasObjRelation(String name) { - return (relations.get(name) != null) ; - } - /** * Sets the TestCase that created the environment. */ diff --git a/qadevOOo/tests/java/mod/_forms/GenericModelTest.java b/qadevOOo/tests/java/mod/_forms/GenericModelTest.java index 2bf33f69f668..92bdf1daaa59 100644 --- a/qadevOOo/tests/java/mod/_forms/GenericModelTest.java +++ b/qadevOOo/tests/java/mod/_forms/GenericModelTest.java @@ -124,26 +124,26 @@ import util.utils; * @see ifc.container._XChild */ public class GenericModelTest extends TestCase { - private static XTextDocument m_xTextDoc; - private static Object m_dbSrc = null; - private static DBTools.DataSourceInfo m_srcInf = null; + private XTextDocument m_xTextDoc; + private Object m_dbSrc = null; + private DBTools.DataSourceInfo m_srcInf = null; /** * This is the name of the Data Base which the test uses: "APITestDatabase" */ - protected final static String m_dbSourceName = "APITestDatabase"; - protected final static String m_TestDB = "TestDB"; + private final static String m_dbSourceName = "APITestDatabase"; + private final static String m_TestDB = "TestDB"; private DBTools m_dbTools = null; - private static boolean m_ConnectionColsed = false; + private boolean m_ConnectionColsed = false; /** - * descibes the kind of the shape which should be created. + * describes the kind of the shape which should be created. * Example: m_kindOfshape=DateFiled */ - public static String m_kindOfControl = null; + protected String m_kindOfControl = null; /** - * If your object needs some special propery values you can specify them with this + * If your object needs some special property values you can specify them with this * ArrayList. You have to add a NamedValue to this list. * Example: * NamedValue myProp = new NamedValue(); @@ -151,7 +151,7 @@ public class GenericModelTest extends TestCase { * myProp.Value = "My special Value"; * m_propertiesToSet.add(myProp); */ - public static ArrayList m_propertiesToSet = new ArrayList(); + protected ArrayList m_propertiesToSet = new ArrayList(); /** * This variable contains the name of the property which should be changed while @@ -161,56 +161,53 @@ public class GenericModelTest extends TestCase { * @see ifc.form._XUpdateBroadcaster.UpdateChecker * @see ifc.form._XUpdateBroadcaster */ - public static String m_ChangePropertyName = null; + protected String m_ChangePropertyName = null; /** * This variable contains the value the property should be set while * interface com::sun::star::form::XUpdateBroadcaster is tested. * The interface test needs the ObjectRelation * "XUpdateBroadcaster.Checker" which is a ifc.form._XUpdateBroadcaster.UpdateChecker. - * Normaly the Checker uses util.ValueChanger to change + * Normally the Checker uses util.ValueChanger to change * the value of the property. If the current of this property is NULL the * ValueChanger is unable to change the value. In this case the value * of this variable was used. */ - public static Object m_ChangePropertyValue = null; + protected Object m_ChangePropertyValue = null; /** - * This variable contains the implelemtation name of the object. + * This variable contains the implementation name of the object. */ - public static String m_ObjectName = null; + protected String m_ObjectName = null; /** - * For local implementaions of Checker this variable contains the + * For local implementations of Checker this variable contains the * FormLoader */ - protected static XLoadable m_XFormLoader = null; + protected XLoadable m_XFormLoader = null; /** - * For local implementaions of Checker this variable contains the + * For local implementations of Checker this variable contains the * XPropertySet */ - protected static XPropertySet m_XPS = null; + protected XPropertySet m_XPS = null; /** - * For local implementaions of Checker this variable contains the + * For local implementations of Checker this variable contains the * Control */ - protected static XInterface m_XCtrl = null; + protected XInterface m_XCtrl = null; /** - * The insterface test of ifc.form._DataWareControlModel expects an + * The interface test of ifc.form._DataWareControlModel expects an * object relation 'LC'. This is a XControlModel of a shape. * This variable contains the kind of shape to create for the interface test, * f.e. "FixedText" * @see ifc.form._DataAwareControlModel */ - protected static String m_LCShape_Type = null; + protected String m_LCShape_Type = null; - protected static String m_XPropertyAccess_propertyToChange = "HelpText"; - - protected static String m_XPropertyContainer_propertyNotRemovable = "HelpText"; /** - * If this variable is true some more debug info was logged. It was setted by the parameter variable + * If this variable is true some more debug info was logged. It was set by the parameter variable * debug_is_active */ - protected static boolean debug = false; + private boolean debug = false; /** * Creates Writer document where controls are placed. @@ -484,10 +481,10 @@ public class GenericModelTest extends TestCase { tEnv.addObjRelation("XFastPropertySet.ExcludeProps", exclude); PropertyValue propVal = new PropertyValue(); - propVal.Name = m_XPropertyAccess_propertyToChange; + propVal.Name = "HelpText"; propVal.Value = "Text since XPropertyAccess"; tEnv.addObjRelation("XPropertyAccess.propertyToChange", propVal); - tEnv.addObjRelation("XPropertyContainer.propertyNotRemovable", m_XPropertyContainer_propertyNotRemovable); + tEnv.addObjRelation("XPropertyContainer.propertyNotRemovable", "HelpText"); return tEnv;