1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: OCurrencyModel.java,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 import com
.sun
.star
.beans
.NamedValue
;
32 import java
.io
.PrintWriter
;
34 import lib
.TestEnvironment
;
35 import lib
.TestParameters
;
39 * Test for object which is represented by service
40 * <code>com.sun.star.form.component.CurrencyField</code>. <p>
41 * Object implements the following interfaces :
43 * <li> <code>com::sun::star::io::XPersistObject</code></li>
44 * <li> <code>com::sun::star::form::XReset</code></li>
45 * <li> <code>com::sun::star::form::XBoundComponent</code></li>
46 * <li> <code>com::sun::star::form::FormComponent</code></li>
47 * <li> <code>com::sun::star::beans::XFastPropertySet</code></li>
48 * <li> <code>com::sun::star::beans::XMultiPropertySet</code></li>
49 * <li> <code>com::sun::star::form::XUpdateBroadcaster</code></li>
50 * <li> <code>com::sun::star::form::DataAwareControlModel</code></li>
51 * <li> <code>com::sun::star::awt::UnoControlCurrencyFieldModel</code></li>
52 * <li> <code>com::sun::star::beans::XPropertyState</code></li>
53 * <li> <code>com::sun::star::form::FormControlModel</code></li>
54 * <li> <code>com::sun::star::container::XNamed</code></li>
55 * <li> <code>com::sun::star::lang::XComponent</code></li>
56 * <li> <code>com::sun::star::lang::XEventListener</code></li>
57 * <li> <code>com::sun::star::beans::XPropertyAccess</code></li>
58 * <li> <code>com::sun::star::beans::XPropertyContainer</code></li>
59 * <li> <code>com::sun::star::beans::XPropertySet</code></li>
60 * <li> <code>com::sun::star::form::XLoadListener</code></li>
61 * <li> <code>com::sun::star::container::XChild</code></li>
62 * <li> <code>com::sun::star::form::component::CurrencyField</code></li>
64 * This object test <b> is NOT </b> designed to be run in several
65 * threads concurently.
66 * @see com.sun.star.io.XPersistObject
67 * @see com.sun.star.form.XReset
68 * @see com.sun.star.form.XBoundComponent
69 * @see com.sun.star.form.FormComponent
70 * @see com.sun.star.beans.XFastPropertySet
71 * @see com.sun.star.beans.XMultiPropertySet
72 * @see com.sun.star.form.XUpdateBroadcaster
73 * @see com.sun.star.form.DataAwareControlModel
74 * @see com.sun.star.awt.UnoControlCurrencyFieldModel
75 * @see com.sun.star.beans.XPropertyState
76 * @see com.sun.star.form.FormControlModel
77 * @see com.sun.star.container.XNamed
78 * @see com.sun.star.lang.XComponent
79 * @see com.sun.star.lang.XEventListener
80 * @see com.sun.star.beans.XPropertyAccess
81 * @see com.sun.star.beans.XPropertyContainer
82 * @see com.sun.star.beans.XPropertySet
83 * @see com.sun.star.form.XLoadListener
84 * @see com.sun.star.container.XChild
85 * @see com.sun.star.form.component.CurrencyField
86 * @see ifc.io._XPersistObject
87 * @see ifc.form._XReset
88 * @see ifc.form._XBoundComponent
89 * @see ifc.form._FormComponent
90 * @see ifc.beans._XFastPropertySet
91 * @see ifc.beans._XMultiPropertySet
92 * @see ifc.form._XUpdateBroadcaster
93 * @see ifc.form._DataAwareControlModel
94 * @see ifc.awt._UnoControlCurrencyFieldModel
95 * @see ifc.beans._XPropertyState
96 * @see ifc.form._FormControlModel
97 * @see ifc.container._XNamed
98 * @see ifc.lang._XComponent
99 * @see ifc.lang._XEventListener
100 * @see ifc.beans._XPropertySet
101 * @see ifc.form._XLoadListener
102 * @see ifc.container._XChild
103 * @see ifc.form.component._CurrencyField
105 public class OCurrencyModel
extends GenericModelTest
{
108 * Set some member variable of the super class <CODE>GenericModelTest</CODE>:
110 * super.m_ChangePropertyName = "Value";
111 * super.m_kindOfControl="CurrencyField";
112 * super.m_ObjectName = "stardiv.one.form.component.CurrencyField";
113 * NamedValue myProp = new NamedValue();
114 * myProp.Name = "DataField";
115 * myProp.Value = "Identifier";
116 * super.m_propertiesToSet.add(myProp);
117 * super.m_LCShape_Type = "FixedText";
119 * Then <CODE>super.initialize()</CODE> was called.
120 * @param tParam the test parameter
121 * @param log the log writer
123 protected void initialize(TestParameters tParam
, PrintWriter log
) {
125 super.initialize(tParam
, log
);
127 super.m_ObjectName
= "stardiv.one.form.component.CurrencyField";
129 super.m_kindOfControl
="CurrencyField";
131 NamedValue myProp
= new NamedValue();
132 myProp
.Name
= "DataField";
133 myProp
.Value
= "Identifier";
134 super.m_propertiesToSet
.add(myProp
);
136 super.m_ChangePropertyName
= "Value";
137 super.m_ChangePropertyValue
= new Double(0);
139 super.m_LCShape_Type
= "FixedText";
143 * calls <CODE>cleanup()</CODE> from it's super class
144 * @param tParam the test parameter
145 * @param log the log writer
147 protected void cleanup(TestParameters tParam
, PrintWriter log
) {
148 super.cleanup(tParam
, log
);
153 * calls <CODE>createTestEnvironment()</CODE> from it's super class
154 * @param Param the test parameter
155 * @param log the log writer
156 * @return lib.TestEnvironment
158 protected synchronized TestEnvironment
createTestEnvironment(TestParameters Param
,
160 return super.createTestEnvironment(Param
, log
);
162 } // finish class OCurrencyModel