blob: 593b68a96b16a6f4d048bcd332c1931e59c52bea [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<UnitTester testDir="LangPacks/Danish/tests/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="LangPackApp.mxml">
<!-- this set of lines form a template that must be in each unit test -->
<mx:Script>
<![CDATA[
public static function init(o:DisplayObject):void
{
}
]]>
</mx:Script>
<mx:Metadata>
<![CDATA[
[Mixin]
]]>
</mx:Metadata>
<!-- end of set of lines that must be in each unit test -->
<mx:Script>
<![CDATA[
import mx.controls.TextInput;
import mx.formatters.CurrencyFormatter;
import mx.managers.SystemManager;
]]>
</mx:Script>
<testCases>
<TestCase testID="DA_Formatters_Currency_Default" description="Test the properties of Currency Formatters." keywords="[Simple, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<RunCode code="application.tin.text=application.mf.cf.format(98765);" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_currencySymbol_Da" description="Test the properties of Currency Formatters." keywords="[currencySymbol, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<SetProperty propertyName="currencySymbol" target="mf.cf" value="ÆØøåæ"/>
<RunCode code="application.tin.text=application.mf.cf.format(98765);"/>
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765ÆØøåæ" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_precision" description="Test that the default precision is -1." keywords="[precision, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<RunCode code=" application.tin.text=application.mf.cf.format(98765.123);" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765,123 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_useThousandsSeparator" description="Test the properties of Currency Formatters." keywords="[useThousandsSeparator, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<RunCode code="application.tin.text=application.mf.cf.format(98765432);" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765.432 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Rounding" description="Test the properties of Currency Formatters." keywords="[rounding, up, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<SetProperty target="mf.cf" propertyName="precision" value="3"/>
<RunCode code="application.tin.text= application.mf.cf.format(98765.4999);" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765,499 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_ThousandsSeparatorFrom" description="Test the properties of Currency Formatters." keywords="[thousandsSeparatorFrom, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<RunCode code="application.tin.text= application.mf.cf.format('98.765,4321')" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765,4321 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_ThousandsSeparatorFrom_Da" description="Test the properties of Currency Formatters." keywords="[thousandsSeparatorFrom, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<SetProperty target="mf.cf" propertyName="thousandsSeparatorFrom" value="T"/>
<RunCode code="application.tin.text= application.mf.cf.format('98T765,4321');" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765,4321 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_DecimalSeparatorFrom" description="Test the properties of Currency Formatters." keywords="[DecimalSeparatorFrom, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<RunCode code="application.tin.text= application.mf.cf.format('98.765,4321');" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765,4321 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_DecimalSeparatorFrom_Da" description="Test the properties of Currency Formatters." keywords="[DecimalSeparatorFrom, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<SetProperty target="mf.cf" propertyName="decimalSeparatorFrom" value="P"/>
<RunCode code="application.tin.text=application.mf.cf.format('98.765P4321');" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765,4321 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_ThousandsSeparatorTo" description="Test the properties of Currency Formatters." keywords="[ThousandsSeparatorTo, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<RunCode code="application.tin.text=application.mf.cf.format('98.765,4321');" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765,4321 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_ThousandsSeparatorTo_Da" description="Test the properties of Currency Formatters." keywords="[ThousandsSeparatorTo, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<SetProperty target="mf.cf" propertyName="thousandsSeparatorTo" value="Æ"/>
<RunCode code="application.tin.text= application.mf.cf.format('98.765,4321');" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98Æ765,4321 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_DecimalSeparatorTo" description="Test the properties of Currency Formatters." keywords="[DecimalSeparatorTo, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<RunCode code="application.tin.text= application.mf.cf.format('98.765,4321');" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765,4321 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_DecimalSeparatorTo_Da" description="Test the properties of Currency Formatters." keywords="[DecimalSeparatorTo, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<SetProperty target="mf.cf" propertyName="decimalSeparatorTo" value="Æ"/>
<RunCode code="application.tin.text= application.mf.cf.format('98.765,4321');" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="98.765Æ4321 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_UseNegativeSign" description="Test the properties of Currency Formatters." keywords="[useNegativeSign, true, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<RunCode code="application.tin.text=application.mf.cf.format('-98.765,4321');" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="-98.765,4321 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_AlignSymbol" description="Test the properties of Currency Formatters." keywords="[alignSymbol, left, inline, Currency, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
<RunCode code=" application.tin.text=application.mf.cf.format('-98.765,4321');" />
</setup>
<body>
<AssertPropertyValue target="tin" propertyName="text" value="-98.765,4321 Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Properties_Rounding" description="Test the properties of Number Formatters." keywords="[rounding, up, inline, Number, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
</setup>
<body>
<AssertPropertyValue target="mf.cf" propertyName="rounding" value="none" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Properties_UseNegativeSign" description="Test the properties of Number Formatters." keywords="[rounding, up, inline, Number, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
</setup>
<body>
<AssertPropertyValue target="mf.cf" propertyName="useNegativeSign" value="true" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Properties_UseThousandsSeparator" description="Test the properties of Number Formatters." keywords="[rounding, up, inline, Number, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
</setup>
<body>
<AssertPropertyValue target="mf.cf" propertyName="useThousandsSeparator" value="true" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Properties_CurrencyFormatterPrecision" description="Test the properties of Number Formatters." keywords="[rounding, up, inline, Number, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
</setup>
<body>
<AssertPropertyValue target="mf.cf" propertyName="precision" value="-1" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Properties_AlignSymbol" description="Test the properties of Number Formatters." keywords="[rounding, up, inline, Number, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
</setup>
<body>
<AssertPropertyValue target="mf.cf" propertyName="alignSymbol" value="right" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Properties_CurrencySymbol" description="Test the properties of Number Formatters." keywords="[rounding, up, inline, Number, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
</setup>
<body>
<AssertPropertyValue target="mf.cf" propertyName="currencySymbol" value=" Kr" />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Properties_DecimalSeparatorFrom" description="Test the properties of Number Formatters." keywords="[rounding, up, inline, Number, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
</setup>
<body>
<AssertPropertyValue target="mf.cf" propertyName="decimalSeparatorFrom" value="," />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Properties_DecimalSeparatorTo" description="Test the properties of Number Formatters." keywords="[rounding, up, inline, Number, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
</setup>
<body>
<AssertPropertyValue target="mf.cf" propertyName="decimalSeparatorTo" value="," />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Properties_ThousandsSeparatorFrom" description="Test the properties of Number Formatters." keywords="[rounding, up, inline, Number, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
</setup>
<body>
<AssertPropertyValue target="mf.cf" propertyName="thousandsSeparatorFrom" value="." />
</body>
</TestCase>
<TestCase testID="DA_Formatters_Currency_Properties_ThousandsSeparatorTo" description="Test the properties of Number Formatters." keywords="[rounding, up, inline, Number, Formatter]">
<setup>
<ResetComponent target="mf" className="components.MyFormatters" waitEvent="updateComplete" waitTarget="mf"/>
</setup>
<body>
<AssertPropertyValue target="mf.cf" propertyName="thousandsSeparatorTo" value="." />
</body>
</TestCase>
</testCases>
</UnitTester>