You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2012/08/06 22:44:04 UTC
svn commit: r1370000 [2/6] - in
/incubator/flex/trunk/mustella/tests/Validators: ./ CreditCardValidator/
CreditCardValidator/Properties/ CreditCardValidator/Properties/baselines/
CreditCardValidator/SWFs/ CurrencyValidator/ CurrencyValidator/Properties...
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/Validators_Properties_Currency_customSep_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/Validators_Properties_Currency_customSep_spark.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/Validators_Properties_Currency_customSep_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/Validators_Properties_Currency_customSep_spark.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,80 @@
+<?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="Validators/CurrencyValidator/Properties/"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns="*"
+ testSWF="Validators_Currency_customSeparator_spark.mxml">
+
+ <!-- this set of lines form a tNbplate 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[
+
+
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <TestCase testID="CurrencyValidator_customSeparator_spark" keywords="[allowNegative, CurrencyValidator]" description="Test CurrencyValidator with a custom decimal separator">
+ <setup>
+ <ResetComponent target="inputValue" className="mx.controls.Label" waitEvent="updateComplete" />
+ <SetProperty target="inputValue" propertyName="text" value="3,6" waitEvent="updateComplete" />
+ </setup>
+ <body>
+ <AssertPropertyValue target="result" propertyName="text" value="valid"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="CurrencyValidator_customSeparatorMax_spark" keywords="[allowNegative, CurrencyValidator]" description="Test CurrencyValidator with a custom decimal separator">
+ <setup>
+ <ResetComponent target="inputValue" className="mx.controls.Label" waitEvent="updateComplete" />
+ <SetProperty target="inputValue" propertyName="text" value="4,6" waitEvent="updateComplete" />
+ </setup>
+ <body>
+ <AssertPropertyValue target="result" propertyName="text" value="invalid"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="CurrencyValidator_customSeparatorMin_spark" keywords="[allowNegative, CurrencyValidator]" description="Test CurrencyValidator with a custom decimal separator">
+ <setup>
+ <ResetComponent target="inputValue" className="mx.controls.Label" waitEvent="updateComplete" />
+ <SetProperty target="inputValue" propertyName="text" value="1,1" waitEvent="updateComplete" />
+ </setup>
+ <body>
+ <AssertPropertyValue target="result" propertyName="text" value="invalid"/>
+ </body>
+ </TestCase>
+
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/Validators_Properties_Currency_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/Validators_Properties_Currency_spark.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/Validators_Properties_Currency_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/Validators_Properties_Currency_spark.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,293 @@
+<?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="Validators/CurrencyValidator/Properties/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="Validators_Currency_Basic_spark.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.validators.CurrencyValidator;
+ import mx.validators.ValidationResult;
+ import mx.managers.SystemManager;
+
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <TestCase testID="CurrencyValidator_currencySymbol_default_spark" keywords="[currencySymbol, CurrencyValidator]">
+ <setup>
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="property" value="text" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="$32" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_currencySymbol_Yen_spark" keywords="[alignSymbol, CurrencyValidator]">
+ <setup>
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="property" value="text" />
+ <SetProperty target="myCustomCu.myCu" propertyName="currencySymbol" value="Â¥" />
+
+ <SetProperty target="myCustomCu.myCu" propertyName="alignSymbol" value="right" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="32Â¥" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_currencySymbol_ó_spark" keywords="[alignSymbol, CurrencyValidator]">
+ <setup>
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="property" value="text" />
+ <SetProperty target="myCustomCu.myCu" propertyName="currencySymbol" value="ó" />
+
+ <SetProperty target="myCustomCu.myCu" propertyName="alignSymbol" value="any" />
+ <SetProperty target="myCustomCu.myCu" propertyName="allowNegative" value="true" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="-32ó" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_currencySymbol_Pound_spark" keywords="[alignSymbol, CurrencyValidator]">
+ <setup>
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="property" value="text" />
+ <SetProperty target="myCustomCu.myCu" propertyName="currencySymbol" value="£" />
+ <SetProperty target="myCustomCu.myCu" propertyName="alignSymbol" value="any"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="allowNegative" value="true" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="-32,000.50£" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_currencySymbol_¤_spark" keywords="[alignSymbol, CurrencyValidator]">
+ <setup>
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+
+ <SetProperty target="myCustomCu.myCu" propertyName="currencySymbol" value="¤"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="alignSymbol" value="any" />
+ <SetProperty target="myCustomCu.myCu" propertyName="allowNegative" value="true" />
+ <SetProperty target="myCustomCu.myCu" propertyName="property" value="text" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="-¤32,000.50" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_currencySymbol_¢_spark" keywords="[alignSymbol, CurrencyValidator]">
+ <setup>
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="currencySymbol" value="¢"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="alignSymbol" value="any" />
+ <SetProperty target="myCustomCu.myCu" propertyName="allowNegative" value="true" />
+ <SetProperty target="myCustomCu.myCu" propertyName="property" value="text" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="-¢50" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_currencySymbolError_spark" keywords="[currencySymbolError, CurrencyValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="32,000.50$" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="valid" />
+ <DispatchMouseEvent target="myCustomCu.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/currencySymbolError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_decimalPointCountError_spark" keywords="[decimalPointCountError, CurrencyValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="$3,200.0.50" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="valid" />
+ <DispatchMouseEvent target="myCustomCu.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/decimalPointCountError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_exceedsMaxError_spark" keywords="[exceedsMaxError, CurrencyValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="maxValue" value="7000" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="$32,000.50" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="valid" />
+ <DispatchMouseEvent target="myCustomCu.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/exceedsMaxError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_invalidCharError_spark" keywords="[invalidCharError, CurrencyValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="maxValue" value="7000" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="@3,2000.50" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+
+ <WaitForEffectsToEnd />
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="valid" />
+ <DispatchMouseEvent target="myCustomCu.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/invalidCharError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_invalidFormatCharsError_spark" keywords="[invalidFormatCharsError, CurrencyValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="32.000,50" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="valid" />
+ <DispatchMouseEvent target="myCustomCu.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/invalidFormatCharsError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_lowerThanMinError_spark" keywords="[lowerThanMinError, CurrencyValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="minValue" value="33000" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="$32,000.50" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="valid" />
+ <DispatchMouseEvent target="myCustomCu.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/lowerThanMinError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="CurrencyValidator_precisionError_spark" keywords="[precisionError, CurrencyValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="precision" value="3" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="$3,200.0050" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="valid" />
+ <DispatchMouseEvent target="myCustomCu.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/precisionError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_separationError_spark" keywords="[separationError, CurrencyValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="precision" value="3" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="$30,00,00" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="valid" />
+ <DispatchMouseEvent target="myCustomCu.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/separationError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="CurrencyValidator_negativeError_spark" keywords="[negativeError, CurrencyValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomCu" className="CustomCu" waitEvent="updateComplete" waitTarget="myCustomCu"/>
+ <SetProperty target="myCustomCu.myCu" propertyName="allowNegative" value="false" />
+ <SetProperty target="myCustomCu.ti1" propertyName="text" value="-$3,2000.50" waitEvent="updateComplete" waitTarget="myCustomCu.ti1"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomCu.myCu" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomCu.myCu" eventName="valid" />
+ <DispatchMouseEvent target="myCustomCu.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomCu.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/negativeError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/currencySymbolError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/currencySymbolError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/currencySymbolError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/currencySymbolError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/currencySymbolError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/currencySymbolError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/decimalPointCountError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/decimalPointCountError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/decimalPointCountError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/decimalPointCountError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/decimalPointCountError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/decimalPointCountError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/exceedsMaxError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/exceedsMaxError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/exceedsMaxError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/exceedsMaxError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/exceedsMaxError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/exceedsMaxError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidCharError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidCharError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidCharError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidCharError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidCharError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidCharError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidFormatCharsError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidFormatCharsError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidFormatCharsError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidFormatCharsError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidFormatCharsError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/invalidFormatCharsError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/lowerThanMinError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/lowerThanMinError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/lowerThanMinError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/lowerThanMinError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/lowerThanMinError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/lowerThanMinError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/negativeError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/negativeError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/negativeError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/negativeError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/negativeError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/negativeError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/precisionError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/precisionError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/precisionError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/precisionError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/precisionError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/precisionError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/separationError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/separationError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/separationError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/separationError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/separationError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/Properties/baselines/separationError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/CustomCu.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/CustomCu.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/CustomCu.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/CustomCu.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,33 @@
+<?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.
+
+-->
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" >
+ <mx:Script>
+ <![CDATA[
+ import mx.controls.TextInput;
+ import mx.validators.CurrencyValidator;
+ import mx.managers.SystemManager;
+
+ ]]>
+ </mx:Script>
+
+ <mx:TextInput id="ti1" />
+ <mx:CurrencyValidator id="myCu" source="{ti1}" property="text" precision="2"/>
+ <mx:Button />
+</mx:VBox>
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic.compile
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic.compile?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic.compile (added)
+++ incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic.compile Mon Aug 6 20:43:57 2012
@@ -0,0 +1 @@
+ -theme=${flexlib}/themes/Halo/halo.swc
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,51 @@
+<?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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" height="375" width="500"
+ backgroundColor="0xFFFFFF" backgroundImage="" xmlns:local="*">
+ <mx:Style>
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+ fontWeight: bold;
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+ fontStyle: italic;
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ global{
+ fontAntiAliasType: "normal";
+ fontFamily: myVerdana;
+ }
+
+ </mx:Style>
+ <local:CustomCu id="myCustomCu"/>
+</mx:Application>
+
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic_spark.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_Basic_spark.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,50 @@
+<?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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" height="375" width="500"
+ backgroundColor="0xFFFFFF" xmlns:local="*">
+ <mx:Style>
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+ fontWeight: bold;
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+ fontStyle: italic;
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ global{
+ fontAntiAliasType: "normal";
+ fontFamily: myVerdana;
+ }
+
+ </mx:Style>
+ <local:CustomCu id="myCustomCu"/>
+</mx:Application>
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator.compile
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator.compile?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator.compile (added)
+++ incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator.compile Mon Aug 6 20:43:57 2012
@@ -0,0 +1 @@
+ -theme=${flexlib}/themes/Halo/halo.swc
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,77 @@
+<?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.
+
+-->
+<mx:Application
+ backgroundColor="0xFFFFFF"
+ height="375" width="500"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns:local="*">
+
+ <mx:Style>
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+ fontWeight: bold;
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+ fontStyle: italic;
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ global{
+ fontAntiAliasType: "normal";
+ fontFamily: myVerdana;
+ }
+ </mx:Style>
+
+ <mx:Script>
+ <![CDATA[
+ import mx.events.ValidationResultEvent;
+
+ protected function isValid(value:String) : String
+ {
+ var result:ValidationResultEvent = validator.validate(value);
+ return result.type;
+ }
+ ]]>
+ </mx:Script>
+
+ <mx:CurrencyValidator id="validator" decimalSeparator="," thousandsSeparator="." maxValue="4.5" minValue="1.2" />
+
+ <mx:Form>
+ <mx:FormItem label="input" >
+ <mx:Label id="inputValue"/>
+ </mx:FormItem>
+ <mx:FormItem label="output" >
+ <mx:Label id="result" text="{isValid(inputValue.text)}" />
+ </mx:FormItem>
+ </mx:Form>
+
+
+</mx:Application>
Added: incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator_spark.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/CurrencyValidator/SWFs/Validators_Currency_customSeparator_spark.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,77 @@
+<?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.
+
+-->
+<mx:Application
+ backgroundColor="0xFFFFFF"
+ height="375" width="500"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns:local="*">
+
+ <mx:Style>
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+ fontWeight: bold;
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+ fontStyle: italic;
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ global{
+ fontAntiAliasType: "normal";
+ fontFamily: myVerdana;
+ }
+ </mx:Style>
+
+ <mx:Script>
+ <![CDATA[
+ import mx.events.ValidationResultEvent;
+
+ protected function isValid(value:String) : String
+ {
+ var result:ValidationResultEvent = validator.validate(value);
+ return result.type;
+ }
+ ]]>
+ </mx:Script>
+
+ <mx:CurrencyValidator id="validator" decimalSeparator="," thousandsSeparator="." maxValue="4.5" minValue="1.2"/>
+
+ <mx:Form>
+ <mx:FormItem label="input" >
+ <mx:Label id="inputValue"/>
+ </mx:FormItem>
+ <mx:FormItem label="output" >
+ <mx:Label id="result" text="{isValid(inputValue.text)}" />
+ </mx:FormItem>
+ </mx:Form>
+
+
+</mx:Application>
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/Validators_Date_Properties.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/Validators_Date_Properties.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/Validators_Date_Properties.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/Validators_Date_Properties.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,314 @@
+<?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="Validators/DateValidator/Properties/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="Validators_Date_Basic.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.controls.DateField;
+ import mx.validators.DateValidator;
+ import mx.validators.ValidationResult;
+ import mx.managers.SystemManager;
+
+
+ [Bindable]
+ public var date1:Date= new Date(2007,0,12);
+ [Bindable]
+ public var dt:DateField = new DateField();
+ public function dateObject() :void
+ {
+ dt.selectedDate=date1;
+ application.myCustomDt.addChild(dt);
+ }
+ ]]>
+ </mx:Script>
+
+ <testCases>
+
+ <TestCase testID="DateValidator_allowedFormatChars_Space" keywords="[DateSymbol, DateValidator]">
+ <setup>
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+
+ </setup>
+ <body>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12 31 2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_allowedFormatChars_Dot" keywords="[DateSymbol, DateValidator]">
+ <setup>
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+
+ </setup>
+ <body>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12.31.2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_allowedFormatChars_ForwardSlash" keywords="[DateSymbol, DateValidator]">
+ <setup>
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="YYYY/MM/DD"/>
+ </setup>
+ <body>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="2006/12/31" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+
+ </body>
+ </TestCase>
+
+ <TestCase testID="DateValidator_allowedFormatChars_BackwardSlash" keywords="[DateSymbol, DateValidator]">
+ <setup>
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="DD/MM/YYYY"/>
+
+ </setup>
+ <body>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" valueExpression="value='31\\12\\2006'" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+
+ </body>
+ </TestCase>
+
+ <TestCase testID="DateValidator_allowedFormatChars_Hyphen_Invalid" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12-31-2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_allowedFormatChars_Hyphen_hash" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="allowedFormatChars" value="#"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12#31#2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_inputFormat_mm_dd" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="mm/dd"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12/31" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_inputFormat_dd_mm" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="DD/MM"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="31/12" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="DateValidator_formatError" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="DD/MMM"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="31/DEC" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" />
+
+
+
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_invalidCharError" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="31$12/2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/invalidCharError.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_wrongDayError" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="31/02/2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomDt.ti1" />
+
+ <CompareBitmap target="" url="../Properties/baselines/wrongDayError.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_wrongMonthError" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="31/13/2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB, TAB]"/>
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomDt.ti1" />
+
+ <CompareBitmap target="" url="../Properties/baselines/wrongMonthError.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_wrongYearError" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12/31/20061" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomDt.ti1" />
+
+ <CompareBitmap target="" url="../Properties/baselines/wrongYearError.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_dateFormat" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="DD/MM/YY"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12/31/2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomDt.ti1" />
+
+ <CompareBitmap target="" url="../Properties/baselines/dateFormat.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="DateValidator_dateObject_Bug_SDK-13397" keywords="[DateSymbol, DateValidator, Bug SDK-13397]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <RunCode code="dateObject()" />
+ <WaitForEffectsToEnd />
+ <SetProperty target="myCustomDt.myDt" propertyName="source" value="{dt}"/>
+ <WaitForEffectsToEnd />
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text" />
+ <WaitForEffectsToEnd />
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="DD/MM/YYYY"/>
+ <WaitForEffectsToEnd />
+
+ </setup>
+ <body>
+ <RunCode code="application.myCustomDt.myDt.validate()" />
+ <Pause timeout="5000"/>
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ </body>
+ </TestCase>
+
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/Validators_Date_Properties_spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/Validators_Date_Properties_spark.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/Validators_Date_Properties_spark.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/Validators_Date_Properties_spark.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,307 @@
+<?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="Validators/DateValidator/Properties/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="Validators_Date_Basic_spark.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.controls.DateField;
+ import mx.validators.DateValidator;
+ import mx.validators.ValidationResult;
+ import mx.managers.SystemManager;
+
+
+ [Bindable]
+ public var date1:Date= new Date(2007,0,12);
+ [Bindable]
+ public var dt:DateField = new DateField();
+ public function dateObject() :void
+ {
+ dt.selectedDate=date1;
+ application.myCustomDt.addChild(dt);
+ }
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <TestCase testID="DateValidator_allowedFormatChars_Space_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+
+ </setup>
+ <body>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12 31 2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_allowedFormatChars_Dot_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+
+ </setup>
+ <body>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12.31.2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_allowedFormatChars_ForwardSlash_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="YYYY/MM/DD"/>
+ </setup>
+ <body>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="2006/12/31" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_allowedFormatChars_BackwardSlash_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="DD/MM/YYYY"/>
+
+ </setup>
+ <body>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" valueExpression="value='31\\12\\2006'" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_allowedFormatChars_Hyphen_Invalid_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12-31-2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_allowedFormatChars_Hyphen_hash_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="allowedFormatChars" value="#"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12#31#2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_inputFormat_mm_dd_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="mm/dd"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12/31" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_inputFormat_dd_mm_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="DD/MM"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="31/12" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="invalid" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="DateValidator_formatError_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="DD/MMM"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="31/DEC" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_invalidCharError_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="31$12/2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="" url="../Properties/baselines/invalidCharError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_wrongDayError_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="31/02/2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomDt.ti1" />
+
+ <CompareBitmap target="" url="../Properties/baselines/wrongDayError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_wrongMonthError_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="31/13/2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB, TAB]"/>
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomDt.ti1" />
+
+ <CompareBitmap target="" url="../Properties/baselines/wrongMonthError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_wrongYearError_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12/31/20061" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]" />
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomDt.ti1" />
+
+ <CompareBitmap target="" url="../Properties/baselines/wrongYearError_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="DateValidator_dateFormat_spark" keywords="[DateSymbol, DateValidator]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text"/>
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="DD/MM/YY"/>
+ <SetProperty target="myCustomDt.ti1" propertyName="text" value="12/31/2006" waitEvent="updateComplete" waitTarget="myCustomDt.ti1"/>
+ <WaitForEffectsToEnd />
+ </setup>
+ <body>
+ <DispatchKeyEvent keys="[TAB, TAB]"/>
+ <AssertEvent target="myCustomDt.myDt" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
+ <AssertNoEvent target="myCustomDt.myDt" eventName="valid" />
+ <DispatchMouseEvent target="myCustomDt.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="myCustomDt.ti1" />
+
+ <CompareBitmap target="" url="../Properties/baselines/dateFormat_spark.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="DateValidator_dateObject_Bug_SDK-13397_spark" keywords="[DateSymbol, DateValidator, Bug SDK-13397]">
+ <setup>
+
+ <ResetComponent target="myCustomDt" className="CustomDt" waitEvent="updateComplete" waitTarget="myCustomDt"/>
+ <RunCode code="dateObject()" />
+ <WaitForEffectsToEnd />
+ <SetProperty target="myCustomDt.myDt" propertyName="source" value="{dt}"/>
+ <WaitForEffectsToEnd />
+ <SetProperty target="myCustomDt.myDt" propertyName="property" value="text" />
+ <WaitForEffectsToEnd />
+ <SetProperty target="myCustomDt.myDt" propertyName="inputFormat" value="DD/MM/YYYY"/>
+ <WaitForEffectsToEnd />
+
+ </setup>
+ <body>
+ <RunCode code="application.myCustomDt.myDt.validate()" />
+ <Pause timeout="5000"/>
+ <AssertEvent target="myCustomDt.myDt" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
+ </body>
+ </TestCase>
+
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/dateFormat.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/dateFormat.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/dateFormat.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/dateFormat_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/dateFormat_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/dateFormat_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/formatError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/formatError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/formatError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/invalidCharError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/invalidCharError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/invalidCharError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/invalidCharError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/invalidCharError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/invalidCharError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongDayError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongDayError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongDayError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongDayError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongDayError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongDayError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongMonthError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongMonthError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongMonthError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongMonthError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongMonthError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongMonthError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongYearError.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongYearError.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongYearError.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongYearError_spark.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongYearError_spark.png?rev=1370000&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/Validators/DateValidator/Properties/baselines/wrongYearError_spark.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/CustomDt.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/CustomDt.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/CustomDt.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/CustomDt.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,14 @@
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" >
+ <mx:Script>
+ <![CDATA[
+ import mx.controls.TextInput;
+ import mx.validators.DateValidator;
+ import mx.managers.SystemManager;
+
+ ]]>
+ </mx:Script>
+
+ <mx:TextInput id="ti1" />
+ <mx:DateValidator id="myDt" source="{ti1}"/>
+ <mx:Button id="bt" label="Date Validator"/>
+</mx:VBox>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/Validators_Date_Basic.compile
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/Validators_Date_Basic.compile?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/Validators_Date_Basic.compile (added)
+++ incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/Validators_Date_Basic.compile Mon Aug 6 20:43:57 2012
@@ -0,0 +1 @@
+ -theme=${flexlib}/themes/Halo/halo.swc
Added: incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/Validators_Date_Basic.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/Validators_Date_Basic.mxml?rev=1370000&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/Validators_Date_Basic.mxml (added)
+++ incubator/flex/trunk/mustella/tests/Validators/DateValidator/SWFs/Validators_Date_Basic.mxml Mon Aug 6 20:43:57 2012
@@ -0,0 +1,49 @@
+<?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.
+
+-->
+<mx:Application backgroundColor="0xFFFFFF" backgroundImage="" height="375" width="500" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="*">
+ <mx:Style>
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+ fontWeight: bold;
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ @font-face{
+ src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+ fontStyle: italic;
+ fontFamily: myVerdana;
+ embedAsCFF: false;
+ }
+
+ global{
+ fontAntiAliasType: "normal";
+ fontFamily: myVerdana;
+ }
+
+ </mx:Style>
+ <local:CustomDt id="myCustomDt"/>
+</mx:Application>