| <?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="States/CurrentSyntax/Integration/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="statesIntegrationApp_Box.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.core.Application; |
| ]]> |
| </mx:Script> |
| |
| <testCases> |
| |
| <TestCase testID="integration_box01_test1" keywords="[States]" description="A button is includedIn only in state1. State is state1" > |
| <setup> |
| <RunCode code="application.goToState1()" waitEvent="inState1" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="box01" propertyName="numChildren" value="1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_box02_test1" keywords="[States]" description="A button is includedIn only in state2. State is state1" > |
| <setup> |
| <RunCode code="application.goToState1()" waitEvent="inState1" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="box02" propertyName="numChildren" value="0" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_box03_test1" keywords="[States]" description="A button is excludedFrom only in state1. State is state1" > |
| <setup> |
| <RunCode code="application.goToState1()" waitEvent="inState1" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="box03" propertyName="numChildren" value="0" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_box04_test1" keywords="[States]" description="A button is excludedFrom only in state2. State is state1" > |
| <setup> |
| <RunCode code="application.goToState1()" waitEvent="inState1" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="box04" propertyName="numChildren" value="1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_box05_test1" keywords="[States]" description="A button is excludedFrom state2 and another is includedIn state2. State is state1" > |
| <setup> |
| <RunCode code="application.goToState1()" waitEvent="inState1" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="box05" propertyName="numChildren" value="1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_box01_test2" keywords="[States]" description="A button is includedIn only in state1. State is state2" > |
| <setup> |
| <RunCode code="application.goToState2()" waitEvent="inState2" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="box01" propertyName="numChildren" value="0" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_box02_test2" keywords="[States]" description="A button is includedIn only in state2. State is state2" > |
| <setup> |
| <RunCode code="application.goToState2()" waitEvent="inState2" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="box02" propertyName="numChildren" value="1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_box03_test2" keywords="[States]" description="A button is excludedFrom only in state1. State is state2" > |
| <setup> |
| <RunCode code="application.goToState2()" waitEvent="inState2" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="box03" propertyName="numChildren" value="1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_box04_test2" keywords="[States]" description="A button is excludedFrom only in state2. State is state2" > |
| <setup> |
| <RunCode code="application.goToState2()" waitEvent="inState2" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="box04" propertyName="numChildren" value="0" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_box05_test2" keywords="[States]" description="A button is excludedFrom state2 and another is includedIn state2. State is state2" > |
| <setup> |
| <RunCode code="application.goToState2()" waitEvent="inState2" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="box05" propertyName="numChildren" value="1" /> |
| </body> |
| </TestCase> |
| |
| |
| </testCases> |
| </UnitTester> |