| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <UnitTester testDir="spark/formatters/CurrencyFormatter/Fallback/" |
| xmlns:mx="http://www.adobe.com/2006/mxml" |
| xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns="*" |
| testSWF="CF_Fallback_actualLocaleIDName_Main.mxml"> |
| |
| <mx:Script> |
| <![CDATA[ |
| import assets.*; |
| |
| public static function init(o:DisplayObject):void |
| { |
| |
| } |
| ]]> |
| </mx:Script> |
| |
| <mx:Metadata> |
| <![CDATA[ |
| [Mixin] |
| ]]> |
| </mx:Metadata> |
| |
| |
| <testCases> |
| <TestCase testID="CF_Fallback_actualLocaleIDName_defaultLocale_declarations_test1" description="test default locale, the actualLocaleIDName is 'en-US'" keywords="[CurrencyFormatter, actualLocaleIDName]"> |
| <setup> |
| <ResetComponent target="cf_inline" className="assets.FallbackCF"/> |
| <RunCode code="application.cf_inline.initialized(null,'cf_inline')"/> |
| <Pause timeout="{CFConstant.pauseTime}"/> |
| </setup> |
| <body> |
| <AssertPropertyValue propertyName="actualLocaleIDName" value="en-US" target="cf_inline"/> |
| <AssertPropertyValue propertyName="lastOperationStatus" value="noError" target="cf_inline"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CF_Fallback_actualLocaleIDName_defaultLocale_script_test2" description="test default locale, the actualLocaleIDName is 'en-US'" keywords="[CurrencyFormatter, actualLocaleIDName]"> |
| <setup> |
| </setup> |
| <body> |
| <AssertPropertyValue propertyName="actualLocaleIDName" value="en-US" target="cf"/> |
| <AssertPropertyValue propertyName="lastOperationStatus" value="noError" target="cf"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CF_Fallback_actualLocaleIDName_Zh_CN_declarations_test3" description="set locale to a valid value, verify the actualLocaleIDName is 'en-US'" keywords="[CurrencyFormatter, actualLocaleIDName]"> |
| <setup> |
| <ResetComponent target="cf_inline" className="assets.FallbackCF"/> |
| <RunCode code="application.cf_inline.initialized(null,'cf_inline')"/> |
| <Pause timeout="{CFConstant.pauseTime}"/> |
| </setup> |
| <body> |
| <SetStyle target="cf_inline" styleName="locale" value="zh_CN" waitEvent="change"/> |
| <AssertPropertyValue propertyName="actualLocaleIDName" value="en-US" target="cf_inline"/> |
| <AssertPropertyValue propertyName="lastOperationStatus" value="noError" target="cf_inline"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CF_Fallback_actualLocaleIDName_Zh_CN_script_test4" description="set locale to a valid value, verify the actualLocaleIDName is 'en-US'" keywords="[CurrencyFormatter, actualLocaleIDName]"> |
| <setup> |
| <ResetComponent target="cf" className="assets.FallbackCF"/> |
| <RunCode code="application.cf.initialized(null,'cf')"/> |
| <Pause timeout="{CFConstant.pauseTime}"/> |
| </setup> |
| <body> |
| <SetStyle target="cf" styleName="locale" value="zh_CN" waitEvent="change"/> |
| <AssertPropertyValue propertyName="actualLocaleIDName" value="en-US" target="cf"/> |
| <AssertPropertyValue propertyName="lastOperationStatus" value="noError" target="cf"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CF_Fallback_actualLocaleIDName_undefined_declarations_test5" description="set locale to undefined, verify the actualLocaleIDName is 'undefined'" keywords="[CurrencyFormatter, actualLocaleIDName]"> |
| <setup> |
| <ResetComponent target="cf_inline" className="assets.FallbackCF"/> |
| <RunCode code="application.cf_inline.initialized(null,'cf_inline')"/> |
| <Pause timeout="{CFConstant.pauseTime}"/> |
| </setup> |
| <body> |
| <SetStyle target="cf_inline" styleName="locale" valueExpression="value=undefined" waitEvent="change"/> |
| <AssertPropertyValue propertyName="actualLocaleIDName" valueExpression="value=undefined" target="cf_inline"/> |
| <AssertPropertyValue propertyName="lastOperationStatus" value="localeUndefinedError" target="cf_inline"/> |
| <AssertPropertyValue propertyName="errorText" valueExpression="value=undefined" target="cf_inline"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CF_Fallback_actualLocaleIDName_undefined_script_test6" description="set locale to undefined, verify the actualLocaleIDName is 'undefined'" keywords="[CurrencyFormatter, actualLocaleIDName]"> |
| <setup> |
| <ResetComponent target="cf" className="assets.FallbackCF"/> |
| <RunCode code="application.cf.initialized(null,'cf')"/> |
| <Pause timeout="{CFConstant.pauseTime}"/> |
| </setup> |
| <body> |
| <SetStyle target="cf" styleName="locale" valueExpression="value=undefined" waitEvent="change"/> |
| <AssertPropertyValue propertyName="actualLocaleIDName" valueExpression="value=undefined" target="cf"/> |
| <AssertPropertyValue propertyName="lastOperationStatus" value="localeUndefinedError" target="cf"/> |
| <AssertPropertyValue propertyName="errorText" valueExpression="value=undefined" target="cf"/> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| </UnitTester> |