| <?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="mx/effects/Move/Props/" |
| xmlns:mx="http://www.adobe.com/2006/mxml" |
| xmlns="*" |
| testSWF="../SWFs/Move_Main.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.effects.Move; |
| ]]> |
| </mx:Script> |
| |
| <!-- |
| Property Test Plan |
| ############################################ |
| |
| xBy |
| xFrom |
| xTo |
| |
| yBy |
| yFrom |
| yTo |
| |
| ############################################ |
| --> |
| |
| <testCases> |
| |
| <TestCase testID="Move_xByZero" keywords="[Effects, Move, Properties, xBy]" description="Try to set the xBy property to zero."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xBy" value="0"/> |
| <AssertPropertyValue target="testEffect" propertyName="xBy" value="0"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xByNegative" keywords="[Effects, Move, Properties, xBy]" description="Try to set the xBy property to a negative value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xBy" value="-20"/> |
| <AssertPropertyValue target="testEffect" propertyName="xBy" value="-20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xByNormal" keywords="[Effects, Move, Properties, xBy]" description="Try to set the xBy property to a normal value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xBy" value="20"/> |
| <AssertPropertyValue target="testEffect" propertyName="xBy" value="20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xByOffStage" keywords="[Effects, Move, Properties, xBy]" description="Try to set the xBy property to a large value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xBy" value="2000"/> |
| <AssertPropertyValue target="testEffect" propertyName="xBy" value="2000"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xFromZero" keywords="[Effects, Move, Properties, xFrom]" description="Try to set the xFrom property to zero."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xFrom" value="0"/> |
| <AssertPropertyValue target="testEffect" propertyName="xFrom" value="0"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xFromNegative" keywords="[Effects, Move, Properties, xFrom]" description="Try to set the xFrom property to a negative value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xFrom" value="-20"/> |
| <AssertPropertyValue target="testEffect" propertyName="xFrom" value="-20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xFromNormal" keywords="[Effects, Move, Properties, xFrom]" description="Try to set the xFrom property to a normal value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xFrom" value="20"/> |
| <AssertPropertyValue target="testEffect" propertyName="xFrom" value="20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xFromOffStage" keywords="[Effects, Move, Properties, xFrom]" description="Try to set the xFrom property to a large value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xFrom" value="2000"/> |
| <AssertPropertyValue target="testEffect" propertyName="xFrom" value="2000"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xToZero" keywords="[Effects, Move, Properties, xTo]" description="Try to set the xTo property to zero."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xTo" value="0"/> |
| <AssertPropertyValue target="testEffect" propertyName="xTo" value="0"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xToNegative" keywords="[Effects, Move, Properties, xTo]" description="Try to set the xTo property to a negative value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xTo" value="-20"/> |
| <AssertPropertyValue target="testEffect" propertyName="xTo" value="-20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xToNormal" keywords="[Effects, Move, Properties, xTo]" description="Try to set the xTo property to a normal value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xTo" value="20"/> |
| <AssertPropertyValue target="testEffect" propertyName="xTo" value="20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_xToOffStage" keywords="[Effects, Move, Properties, xTo]" description="Try to set the xTo property to a large value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="xTo" value="2000"/> |
| <AssertPropertyValue target="testEffect" propertyName="xTo" value="2000"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yByZero" keywords="[Effects, Move, Properties, yBy]" description="Try to set the yBy property to zero."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yBy" value="0"/> |
| <AssertPropertyValue target="testEffect" propertyName="yBy" value="0"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yByNegative" keywords="[Effects, Move, Properties, yBy]" description="Try to set the yBy property to a negative value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yBy" value="-20"/> |
| <AssertPropertyValue target="testEffect" propertyName="yBy" value="-20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yByNormal" keywords="[Effects, Move, Properties, yBy]" description="Try to set the yBy property to a normal value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yBy" value="20"/> |
| <AssertPropertyValue target="testEffect" propertyName="yBy" value="20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yByOffStage" keywords="[Effects, Move, Properties, yBy]" description="Try to set the yBy property to a large value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yBy" value="2000"/> |
| <AssertPropertyValue target="testEffect" propertyName="yBy" value="2000"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yFromZero" keywords="[Effects, Move, Properties, yFrom]" description="Try to set the yFrom property to zero."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yFrom" value="0"/> |
| <AssertPropertyValue target="testEffect" propertyName="yFrom" value="0"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yFromNegative" keywords="[Effects, Move, Properties, yFrom]" description="Try to set the yFrom property to a negative value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yFrom" value="-20"/> |
| <AssertPropertyValue target="testEffect" propertyName="yFrom" value="-20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yFromNormal" keywords="[Effects, Move, Properties, yFrom]" description="Try to set the yFrom property to a normal value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yFrom" value="20"/> |
| <AssertPropertyValue target="testEffect" propertyName="yFrom" value="20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yFromOffStage" keywords="[Effects, Move, Properties, yFrom]" description="Try to set the yFrom property to a large value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yFrom" value="2000"/> |
| <AssertPropertyValue target="testEffect" propertyName="yFrom" value="2000"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yToZero" keywords="[Effects, Move, Properties, yTo]" description="Try to set the yTo property to zero."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yTo" value="0"/> |
| <AssertPropertyValue target="testEffect" propertyName="yTo" value="0"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yToNegative" keywords="[Effects, Move, Properties, yTo]" description="Try to set the yTo property to a negative value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yTo" value="-20"/> |
| <AssertPropertyValue target="testEffect" propertyName="yTo" value="-20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yToNormal" keywords="[Effects, Move, Properties, yTo]" description="Try to set the yTo property to a normal value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yTo" value="20"/> |
| <AssertPropertyValue target="testEffect" propertyName="yTo" value="20"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_yToOffStage" keywords="[Effects, Move, Properties, yTo]" description="Try to set the yTo property to a large value."> |
| <setup> |
| <ResetComponent target="testVBox" className="Assets.TrixVBox" waitTarget="testVBox" waitEvent="updateComplete"/> |
| <ResetComponent target="testEffect" className="mx.effects.Move"/> |
| </setup> |
| <body> |
| <SetProperty target="testEffect" propertyName="yTo" value="2000"/> |
| <AssertPropertyValue target="testEffect" propertyName="yTo" value="2000"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Move_RelevantStyles" keywords="[Move, properties, RelevantStyles]" description="Test the return values from RelevantStyles."> |
| <body> |
| <AssertPropertyValue target="testEffect" propertyName="relevantStyles" value="left,right,top,bottom,horizontalCenter,verticalCenter" /> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| |
| </UnitTester> |