incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1370239 [1/2] - in /incubator/flex/trunk/mustella/tests/collections: ./ ArrayCollection/ ArrayCollection/Methods/ ArrayCollection/Properties/ ArrayCollection/SWFs/ ArrayList/ ArrayList/Methods/ ArrayList/Properties/ ArrayList/SWFs/ IViewCu...
Date Tue, 07 Aug 2012 13:14:17 GMT
Author: pent
Date: Tue Aug  7 13:14:16 2012
New Revision: 1370239

URL: http://svn.apache.org/viewvc?rev=1370239&view=rev
Log:
Mustella submission

Added:
    incubator/flex/trunk/mustella/tests/collections/
    incubator/flex/trunk/mustella/tests/collections/ArrayCollection/
    incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Methods/
    incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Methods/ArrayCollection_Methods.mxml
    incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Properties/
    incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Properties/ArrayCollection_Properties.mxml
    incubator/flex/trunk/mustella/tests/collections/ArrayCollection/SWFs/
    incubator/flex/trunk/mustella/tests/collections/ArrayCollection/SWFs/ArrayCollectionMain.mxml
    incubator/flex/trunk/mustella/tests/collections/ArrayList/
    incubator/flex/trunk/mustella/tests/collections/ArrayList/Methods/
    incubator/flex/trunk/mustella/tests/collections/ArrayList/Methods/ArrayList_Methods.mxml
    incubator/flex/trunk/mustella/tests/collections/ArrayList/Properties/
    incubator/flex/trunk/mustella/tests/collections/ArrayList/Properties/ArrayList_Properties.mxml
    incubator/flex/trunk/mustella/tests/collections/ArrayList/SWFs/
    incubator/flex/trunk/mustella/tests/collections/ArrayList/SWFs/ArrayListMain.mxml
    incubator/flex/trunk/mustella/tests/collections/IViewCursor/
    incubator/flex/trunk/mustella/tests/collections/IViewCursor/Methods/
    incubator/flex/trunk/mustella/tests/collections/IViewCursor/Methods/IViewCursor_Methods.mxml
    incubator/flex/trunk/mustella/tests/collections/IViewCursor/Properties/
    incubator/flex/trunk/mustella/tests/collections/IViewCursor/Properties/IViewCursor_Properties.mxml
    incubator/flex/trunk/mustella/tests/collections/IViewCursor/SWFs/
    incubator/flex/trunk/mustella/tests/collections/IViewCursor/SWFs/IViewCursorMain.mxml
    incubator/flex/trunk/mustella/tests/collections/ListCollectionView/
    incubator/flex/trunk/mustella/tests/collections/ListCollectionView/Methods/
    incubator/flex/trunk/mustella/tests/collections/ListCollectionView/Methods/ListCollectionView_Methods.mxml
    incubator/flex/trunk/mustella/tests/collections/ListCollectionView/SWFs/
    incubator/flex/trunk/mustella/tests/collections/ListCollectionView/SWFs/ListCollectionViewMain.mxml
    incubator/flex/trunk/mustella/tests/collections/XMLListCollection/
    incubator/flex/trunk/mustella/tests/collections/XMLListCollection/Methods/
    incubator/flex/trunk/mustella/tests/collections/XMLListCollection/Methods/XMLListCollection_Methods.mxml
    incubator/flex/trunk/mustella/tests/collections/XMLListCollection/SWFs/
    incubator/flex/trunk/mustella/tests/collections/XMLListCollection/SWFs/XmlListCollection_creation.mxml

Added: incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Methods/ArrayCollection_Methods.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Methods/ArrayCollection_Methods.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Methods/ArrayCollection_Methods.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Methods/ArrayCollection_Methods.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,205 @@
+<?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="collections/ArrayCollection/Methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="ArrayCollectionMain.mxml">
+	<mx:Script>
+	<![CDATA[
+	
+	public static function init(o:DisplayObject):void
+	{
+
+	}					
+	]]>
+	</mx:Script>
+	<mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</mx:Metadata>	
+
+	
+
+	<mx:Script>
+	<![CDATA[
+	import mx.collections.*;
+	public var obj1:Object = {abbreviation:"WIN", name:"Winnipeg", international:false};
+        public var obj2:Object = {abbreviation:"SAC", name:"Sacramento", international:true};
+        public var obj3:Object = {abbreviation:"SEA", name:"Seattle", international:true}; 
+	public var colLength:int;
+	]]>
+	</mx:Script>
+  
+    <testCases>
+    
+    	<TestCase testID="ArrayCollection_Method_SetItemAtEnd" keywords="[ArrayCollection, Method, setItemAt]">
+ 	   <body>
+		<AssertMethodValue method="value = 0; try 
+		{ application.airportCollection.setItemAt(obj1, application.airportCollection.length); }
+		catch (e:Error) { value = e.message }"
+		value="Index '12' specified is out of bounds." />
+	   </body>
+        </TestCase>
+        
+       	<TestCase testID="ArrayCollection_Method_SetItemAtEndPastOne" keywords="[ArrayCollection, Method, setItemAt]">
+	   <body>
+		<AssertMethodValue method="value = 0; try 
+		{ application.airportCollection.setItemAt(obj1, application.airportCollection.length+1); }
+		catch (e:Error) { value = e.message }"
+		value="Index '13' specified is out of bounds." />
+	   </body>
+        </TestCase>
+        
+      	<TestCase testID="ArrayCollection_Method_SetItemBeforeEnd" keywords="[ArrayCollection, Method, setItemAt]">
+	   <body>
+	   	<RunCode code="colLength = application.airportCollection.length;
+	   	application.airportCollection.setItemAt(obj1, colLength -1);" />
+		<AssertMethodValue method="value = (application.airportCollection.getItemAt(application.airportCollection.length-1).abbreviation ==
+		obj1.abbreviation )"   value="true" />  
+                   
+	   </body>
+        </TestCase>
+        
+  	<TestCase testID="ArrayCollection_Method_AddItemAtEnd" keywords="[ArrayCollection, Method, addItemAt]">
+	   <body>
+	   	<RunCode code="colLength = application.airportCollection.length;
+	   	application.airportCollection.addItemAt(obj2, colLength);" />
+		<AssertMethodValue method="value = (application.airportCollection.getItemAt(colLength).abbreviation ==
+		obj2.abbreviation )"  value="true" />  
+                   
+	   </body>
+        </TestCase>
+        
+      	<TestCase testID="ArrayCollection_Method_AddItemAtEndPastOne" keywords="[ArrayCollection, Method, addItemAt]">
+	   <body>
+		<AssertMethodValue method="value = 0; try 
+		{ application.airportCollection.addItemAt(obj1, application.airportCollection.length+1); }
+		catch (e:Error) { value = e.message }"
+		value="Index '14' specified is out of bounds." />
+	   </body>
+        </TestCase>
+        
+      	<TestCase testID="ArrayCollection_Method_SetItemAt0" keywords="[ArrayCollection, Method, setItemAt]">
+	   <body>
+	   	<RunCode code="application.airportCollection.setItemAt(obj1, 0);" />
+		<AssertMethodValue method="value = (application.airportCollection.getItemAt(0).abbreviation ==
+		obj1.abbreviation )"  value="true" />  
+                   
+	   </body>
+        </TestCase> 
+        
+  	<TestCase testID="ArrayCollection_Method_SetItemAtBeforeBeginning" keywords="[ArrayCollection, Method, setItemAt]">
+	   <body>
+		<AssertMethodValue method="value = 0; try 
+		{ application.airportCollection.setItemAt(obj2, -1); }
+		catch (e:Error) { value = e.message }"
+		value="Index '-1' specified is out of bounds." />
+	   </body>
+        </TestCase>
+
+      	<TestCase testID="ArrayCollection_Method_SetItemAt1" keywords="[ArrayCollection, Method, setItemAt]">
+	   <body>
+	   	<RunCode code="application.airportCollection.setItemAt(obj3, 1);" />
+		<AssertMethodValue method="value = (application.airportCollection.getItemAt(1).abbreviation ==
+		obj3.abbreviation )"  value="true" />  
+                   
+	   </body>
+        </TestCase> 
+        
+      	<TestCase testID="ArrayCollection_Method_AddItemAt0" keywords="[ArrayCollection, Method, addItemAt]">
+	   <body>
+	   	<RunCode code="application.airportCollection.addItemAt(obj1, 0);" />
+		<AssertMethodValue method="value = (application.airportCollection.getItemAt(0).abbreviation ==
+		obj1.abbreviation )"  value="true" />  
+                   
+	   </body>
+        </TestCase>
+        
+      	<TestCase testID="ArrayCollection_Method_AddItemAt1" keywords="[ArrayCollection, Method, addItemAt]">
+	   <body>
+	   	<RunCode code="application.airportCollection.addItemAt(obj2, 1);" />
+		<AssertMethodValue method="value = (application.airportCollection.getItemAt(1).abbreviation ==
+		obj2.abbreviation )"   value="true" />  
+                   
+	   </body>
+        </TestCase> 
+
+  	<TestCase testID="ArrayCollection_Method_AddItemAtBeforeBeginning" keywords="[ArrayCollection, Method, addItemAt]">
+	   <body>
+		<AssertMethodValue method="value = 0; try 
+		{ application.airportCollection.addItemAt(obj2, -1); }
+		catch (e:Error) { value = e.message }"
+		value="Index '-1' specified is out of bounds." />
+	   </body>
+        </TestCase>
+        
+  	<TestCase testID="ArrayCollection_Method_removeItemAt" keywords="[ArrayCollection, Method, removeItemAt]">
+	   <body>
+	   	<AssertPropertyValue target="airportCollection" propertyName ="length" value="15"/>
+		<AssertMethodValue method="var obj:Object = application.airportCollection.getItemAt(3);
+		value = (application.airportCollection.removeItemAt(3).abbreviation ==
+		obj.abbreviation )"   value="true" />
+		<AssertPropertyValue target="airportCollection" propertyName ="length" value="14"/>
+	   </body>
+        </TestCase> 
+        
+  	<TestCase testID="ArrayCollection_Method_contains" keywords="[ArrayCollection, Method, contains]">
+  	   <setup>
+  	   	<RunCode code ="application.ready()" />
+  	   </setup>
+	   <body>
+	   	<AssertPropertyValue target="ac" propertyName ="length" value="4"/>
+		<AssertMethodValue method="value = application.ac.contains(application.players[1])" value="false" />
+		
+	   </body>
+        </TestCase>      
+        
+	<TestCase testID="ArrayCollection_Method_itemUpdated" keywords="[ArrayCollection, Method, itemUpdated]">
+  	   <setup>
+  	   	<RunCode code ="application.ready();
+  	   	var oldValue:Number = application.players[1].jerseyNumber;
+            	application.players[1].jerseyNumber = 13; 		
+            	application.ac.itemUpdated(application.players[1], 'jerseyNumber', oldValue, 13);"
+             />
+  	   </setup>
+	   <body>
+	   	<AssertPropertyValue target="ac" propertyName ="length" value="5"/>
+		<AssertMethodValue method="value = application.ac.contains(application.players[1])" value="true" />
+		<AssertMethodValue method="value = application.players[1].jerseyNumber==application.ac[2].jerseyNumber" value="true" />
+		<AssertMethodValue method="value = application.players[1].lastName==application.ac[2].lastName" value="true" />
+		
+	   </body>
+        </TestCase> 
+        
+	<TestCase testID="ArrayCollection_Method_itemUpdated_contains" keywords="[ArrayCollection, Method, itemUpdated,contains]">
+  	   <setup>
+  	   	<RunCode code ="application.ready();
+  	   	var oldValue:Number = application.players[2].jerseyNumber;
+            	application.players[2].jerseyNumber = 80; 		
+            	application.ac.itemUpdated(application.players[2], 'jerseyNumber', oldValue, 80);"
+             />
+  	   </setup>
+	   <body>
+	   	<AssertPropertyValue target="ac" propertyName ="length" value="4"/>
+		<AssertMethodValue method="value = application.ac.contains(application.players[11])" value="false" />
+	
+	   </body>
+        </TestCase>     
+        
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Properties/ArrayCollection_Properties.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Properties/ArrayCollection_Properties.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Properties/ArrayCollection_Properties.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/ArrayCollection/Properties/ArrayCollection_Properties.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,99 @@
+<?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="collections/ArrayCollection/Properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="ArrayCollectionMain.mxml">
+	<mx:Script>
+	<![CDATA[
+	
+	public static function init(o:DisplayObject):void
+	{
+
+	}					
+	]]>
+	</mx:Script>
+	<mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</mx:Metadata>	
+
+	
+
+	<mx:Script>
+	<![CDATA[
+
+	import mx.collections.*;
+	
+	]]>
+	</mx:Script>
+  
+    <testCases>
+    
+      	<TestCase testID="ArrayCollection_Property_nested_dataGrid" keywords="[ArrayCollection, Property,dataGrid]">
+	   <body>
+	   	<AssertPropertyValue target="dg_nested.dataProvider" propertyName ="length" value="10"/> 
+           	<SetProperty  target="dg_nested" propertyName ="selectedIndex" value="4"/>
+           	<AssertPropertyValue target="dg_nested.selectedItem" propertyName ="name" value="Cincinatti"/>
+           	<AssertPropertyValue target="dg_nested.selectedItem" propertyName ="abbreviation" value="CVG"/>
+		<SetProperty  target="dg_nested" propertyName ="selectedIndex" value="0"/>
+           	<AssertPropertyValue target="dg_nested.selectedItem" propertyName ="name" value="Houston"/>
+           	<AssertPropertyValue target="dg_nested.selectedItem" propertyName ="abbreviation" value="IAH"/>
+	              	
+	   </body>
+        </TestCase> 
+
+      	<TestCase testID="ArrayCollection_Property_repeater" keywords="[ArrayCollection, Property,repeater]">
+	   <body>
+	   	<AssertPropertyValue target="playerId" propertyName ="length" value="6"/> 
+           	<AssertMethodValue target="playerId" method=" value =application.playerId[0].text " value="LastNameA, PersonA"/>      	
+           	<AssertMethodValue target="playerId" method=" value =application.playerId[5].text " value="LastNameD, PersonF"/>      	
+	  	<AssertMethodValue target="playerId" method=" value =application.playerId[3].text " value="LastNameB, PersonD"/>      	
+	  
+	   </body>
+        </TestCase>
+        
+      	<TestCase testID="ArrayCollection_Property_repeater_cursor" keywords="[ArrayCollection, Property,repeater]">
+      	   <setup>
+	    	   <RunCode code="application.cursor = application.matchingArray.createCursor(); " />
+    	   </setup>
+	   <body>
+	   	<AssertMethodValue method=" value =application.cursor.current.lastName + ', ' +application.cursor.current.firstName " value="LastNameA, PersonA"/>      	
+           	<AssertMethodValue method="application.cursor.moveNext();application.cursor.moveNext();
+           	value =application.cursor.current.lastName + ', ' +application.cursor.current.firstName" value="LastNameB, PersonC"/>      	
+	  	<AssertMethodValue method="application.cursor.moveNext();application.cursor.moveNext();application.cursor.moveNext();
+		value =application.cursor.current.lastName + ', ' +application.cursor.current.firstName" value="LastNameD, PersonF"/>      	
+	  	
+	   </body>
+        </TestCase>
+        
+	<TestCase testID="ArrayCollection_Property_view_cursor_sort" keywords="[ArrayCollection, Property,view,sort]">
+      	   <setup>
+	    	   <RunCode code="application.createView()" />
+	   </setup>
+	   <body>
+	   	<AssertMethodValue method=" value =application.cursor.current.firstName " value="PersonA"/>      	
+           	<AssertMethodValue method="application.cursor.moveNext();application.cursor.moveNext();
+           	value =application.cursor.current.firstName " value="PersonC"/> 
+           	<AssertMethodValue method="application.cursor.moveNext();application.cursor.moveNext();
+           	value =application.cursor.current.firstName " value="PersonE"/>
+	   </body>
+        </TestCase>  
+        
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/collections/ArrayCollection/SWFs/ArrayCollectionMain.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/ArrayCollection/SWFs/ArrayCollectionMain.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/ArrayCollection/SWFs/ArrayCollectionMain.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/ArrayCollection/SWFs/ArrayCollectionMain.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+  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"  xmlns:mx="http://www.adobe.com/2006/mxml" >
+
+<mx:Script>
+    <![CDATA[
+        
+        import mx.collections.*;
+        [Bindable]
+	public var ac:ArrayCollection;
+	public var cursor:IViewCursor;
+	[Bindable]
+        public var view:ListCollectionView;
+        
+	public var players:Array=[
+	            {team:"TeamOne",jerseyNumber:80,lastName:"PlayerA",firstName:"Aa"},
+	            {team:"TeamTwo",jerseyNumber:7, lastName:"PlayerB",firstName:"Bb"},
+	            {team:"TeamOne",jerseyNumber:12, lastName:"PlayerC",firstName:"Cc"},
+	            {team:"TeamOne",jerseyNumber:21,lastName:"PlayerD",firstName:"Dd"},
+	            {team:"TeamThree",jerseyNumber:34, lastName:"PlayerE",firstName:"Ee"},
+	            {team:"TeamOne",jerseyNumber:12, lastName:"PlayerF",firstName:"Ff"},
+	            {team:"TeamTwo",jerseyNumber:7, lastName:"PlayerG",firstName:"Gg"},
+        ];
+        
+        public function ready():void
+	        {
+	            ac = new ArrayCollection(players);
+	            var s:Sort = new Sort();
+	            var f:SortField = new SortField("jerseyNumber");
+	            ac.filterFunction = function (item:Object):Boolean
+	            {
+	                return item.jerseyNumber >= 12 && item.jerseyNumber <= 34;
+	            }
+	            s.fields = [f];
+	            ac.sort = s;
+	            ac.refresh();
+        }
+
+	public function createView():void {
+            var s:Sort = new Sort();
+            s.fields = [new SortField("firstName")];
+            matchingArray.sort = s;
+            matchingArray.refresh();
+            view = new ListCollectionView(matchingArray);
+            cursor = view.createCursor();
+        }
+ 
+     ]]>
+</mx:Script>
+
+	<mx:ArrayCollection id="airportCollection">
+	  <mx:source>
+		<mx:Array>
+		    <mx:Object abbreviation="IAH" name="Houston" international="true"/>
+		    <mx:Object abbreviation="BOS" name="Boston" international="true"/>
+	            <mx:Object abbreviation="MHT" name="Manchester" international="false"/>
+	            <mx:Object abbreviation="JAX" name="Jacksonville" international="false"/>
+	            <mx:Object abbreviation="CVG" name="Cincinatti" international="false"/>
+	            <mx:Object abbreviation="ATL" name="Atlanta" international="true"/>
+	            <mx:Object abbreviation="CDG" name="Paris" international="true"/>
+	            <mx:Object abbreviation="JFK" name="New York" international="true"/>
+	            <mx:Object abbreviation="LAX" name="Los Angeles" international="true"/>
+	            <mx:Object abbreviation="HND" name="Tokyo" international="true"/>
+                    <mx:Object abbreviation="SFO" name="San Francisco" international="true"/>
+                    <mx:Object abbreviation="SJO" name="San Jose" international="false"/>
+		</mx:Array>
+	  </mx:source>
+	</mx:ArrayCollection>
+	
+	<mx:Array id="airportCodes">
+		<mx:Object abbreviation="IAH" name="Houston"/>
+		<mx:Object abbreviation="BOS" name="Boston"/>
+        	<mx:Object abbreviation="MHT" name="Manchester"/>
+        	<mx:Object abbreviation="JAX" name="Jacksonville"/>
+	</mx:Array>
+
+	<mx:ArrayCollection id="airportCollectionBound">
+		<mx:source>{airportCodes}</mx:source>
+	</mx:ArrayCollection>
+	
+
+<mx:DataGrid id="dg" />
+
+<mx:DataGrid id="dg_nested" >
+    	<mx:dataProvider>
+		<mx:ArrayCollection>
+			<mx:source>
+				<mx:Array>
+					<mx:Object abbreviation="IAH" name="Houston"/>
+					<mx:Object abbreviation="BOS" name="Boston"/>
+			            	<mx:Object abbreviation="MHT" name="Manchester"/>
+			            	<mx:Object abbreviation="JAX" name="Jacksonville"/>
+			            	<mx:Object abbreviation="CVG" name="Cincinatti"/>
+			            	<mx:Object abbreviation="ATL" name="Atlanta"/>
+			            	<mx:Object abbreviation="CDG" name="Paris"/>
+			            	<mx:Object abbreviation="JFK" name="New York"/>
+			            	<mx:Object abbreviation="LAX" name="Los Angeles"/>
+			            	<mx:Object abbreviation="HND" name="Tokyo"/>
+				</mx:Array>
+			</mx:source>
+		</mx:ArrayCollection>
+    	</mx:dataProvider>
+    </mx:DataGrid>
+
+    <mx:Repeater id="myRepeater" >
+    	<mx:dataProvider>  
+	    <mx:ArrayCollection>  
+		<mx:source>  
+		    <mx:Array>  
+			<mx:Object firstName="PersonA" lastName="LastNameA" ssn="555-55-5555" />  
+			<mx:Object firstName="PersonB" lastName="LastNameB" ssn="555-55-5555" /> 
+			<mx:Object firstName="PersonC" lastName="LastNameB" ssn="555-55-5555" /> 
+			<mx:Object firstName="PersonD" lastName="LastNameB" ssn="555-55-5555" />  
+			<mx:Object firstName="PersonE" lastName="LastNameC" ssn="555-55-5555" />  
+			<mx:Object firstName="PersonF" lastName="LastNameD" ssn="555-55-5555" />  
+		    </mx:Array>  
+		</mx:source>  
+	    </mx:ArrayCollection>
+       	</mx:dataProvider>
+	<mx:Label id="playerId" text="{myRepeater.currentItem.lastName}, {myRepeater.currentItem.firstName}" />
+    </mx:Repeater>
+
+    <mx:ArrayCollection id="matchingArray">  
+        <mx:Object firstName="PersonA" lastName="LastNameA" ssn="555-55-5555" />  
+        <mx:Object firstName="PersonB" lastName="LastNameB" ssn="555-55-5555" /> 
+        <mx:Object firstName="PersonC" lastName="LastNameB" ssn="555-55-5555" /> 
+        <mx:Object firstName="PersonD" lastName="LastNameB" ssn="555-55-5555" />  
+        <mx:Object firstName="PersonE" lastName="LastNameC" ssn="555-55-5555" />  
+        <mx:Object firstName="PersonF" lastName="LastNameD" ssn="555-55-5555" />  
+    </mx:ArrayCollection>
+
+    <mx:Repeater id="myRepeaterId" dataProvider="{matchingArray}">
+	<mx:Label id="myRepeaterLabel" text="{myRepeaterId.currentItem.lastName}, {myRepeaterId.currentItem.firstName}" />
+    </mx:Repeater>
+    
+</mx:Application>
\ No newline at end of file

Added: incubator/flex/trunk/mustella/tests/collections/ArrayList/Methods/ArrayList_Methods.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/ArrayList/Methods/ArrayList_Methods.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/ArrayList/Methods/ArrayList_Methods.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/ArrayList/Methods/ArrayList_Methods.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,191 @@
+<?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="collections/ArrayList/Methods/"  xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="http://ns.adobe.com/mxml/2009" xmlns:m="http://ns.adobe.com/mxml/2009" xmlns="*" testSWF="ArrayListMain.mxml">
+    <m:Script>
+    <![CDATA[
+
+    public static function init(o:DisplayObject):void
+    {
+
+    }
+    ]]>
+    </m:Script>
+    <m:Metadata>
+    <![CDATA[
+        [Mixin]
+    ]]>
+    </m:Metadata>
+
+
+
+    <m:Script>
+    <![CDATA[
+
+        import mx.collections.ArrayList;
+        import mx.collections.IList;
+    public var obj1:Object = {abbreviation:"WIN", name:"Winnipeg", international:false};
+        public var obj2:Object = {abbreviation:"SAC", name:"Sacramento", international:true};
+        public var obj3:Object = {abbreviation:"SEA", name:"Seattle", international:true};
+    public var colLength:int;
+
+    ]]>
+    </m:Script>
+
+    <testCases>
+
+        <TestCase testID="ArrayList_Method_SetItemAtEnd" keywords="[ArrayList, Method, setItemAt]">
+       <body>
+        <AssertMethodValue method="value = 0; try
+        { application.airportCollection.setItemAt(obj1, application.airportCollection.length); }
+        catch (e:Error) { value = e.message }"
+        value="Index '12' specified is out of bounds." />
+       </body>
+        </TestCase>
+
+        <TestCase testID="ArrayList_Method_SetItemAtEndPastOne" keywords="[ArrayList, Method, setItemAt]">
+       <body>
+        <AssertMethodValue method="value = 0; try
+        { application.airportCollection.setItemAt(obj1, application.airportCollection.length+1); }
+        catch (e:Error) { value = e.message }"
+        value="Index '13' specified is out of bounds." />
+       </body>
+        </TestCase>
+
+        <TestCase testID="ArrayList_Method_SetItemBeforeEnd" keywords="[ArrayList, Method, setItemAt]">
+       <body>
+        <RunCode code="colLength = application.airportCollection.length;
+        application.airportCollection.setItemAt(obj1, colLength -1);" />
+        <AssertMethodValue method="value = (application.airportCollection.getItemAt(application.airportCollection.length-1).abbreviation ==
+        obj1.abbreviation )"   value="true" />
+
+       </body>
+        </TestCase>
+
+    <TestCase testID="ArrayList_Method_AddItemAtEnd" keywords="[ArrayList, Method, addItemAt]">
+       <body>
+        <RunCode code="colLength = application.airportCollection.length;
+        application.airportCollection.addItemAt(obj2, colLength);" />
+        <AssertMethodValue method="value = (application.airportCollection.getItemAt(colLength).abbreviation ==
+        obj2.abbreviation )"  value="true" />
+
+       </body>
+        </TestCase>
+
+        <TestCase testID="ArrayList_Method_AddItemAtEndPastOne" keywords="[ArrayList, Method, addItemAt]">
+       <body>
+        <AssertMethodValue method="value = 0; try
+        { application.airportCollection.addItemAt(obj1, application.airportCollection.length+1); }
+        catch (e:Error) { value = e.message }"
+        value="Index '14' specified is out of bounds." />
+       </body>
+        </TestCase>
+
+        <TestCase testID="ArrayList_Method_SetItemAt0" keywords="[ArrayList, Method, setItemAt]">
+       <body>
+        <RunCode code="application.airportCollection.setItemAt(obj1, 0);" />
+        <AssertMethodValue method="value = (application.airportCollection.getItemAt(0).abbreviation ==
+        obj1.abbreviation )"  value="true" />
+
+       </body>
+        </TestCase>
+
+    <TestCase testID="ArrayList_Method_SetItemAtBeforeBeginning" keywords="[ArrayList, Method, setItemAt]">
+       <body>
+        <AssertMethodValue method="value = 0; try
+        { application.airportCollection.setItemAt(obj2, -1); }
+        catch (e:Error) { value = e.message }"
+        value="Index '-1' specified is out of bounds." />
+       </body>
+        </TestCase>
+
+        <TestCase testID="ArrayList_Method_SetItemAt1" keywords="[ArrayList, Method, setItemAt]">
+       <body>
+        <RunCode code="application.airportCollection.setItemAt(obj3, 1);" />
+        <AssertMethodValue method="value = (application.airportCollection.getItemAt(1).abbreviation ==
+        obj3.abbreviation )"  value="true" />
+
+       </body>
+        </TestCase>
+
+        <TestCase testID="ArrayList_Method_AddItemAt0" keywords="[ArrayList, Method, addItemAt]">
+       <body>
+        <RunCode code="application.airportCollection.addItemAt(obj1, 0);" />
+        <AssertMethodValue method="value = (application.airportCollection.getItemAt(0).abbreviation ==
+        obj1.abbreviation )"  value="true" />
+
+       </body>
+        </TestCase>
+
+        <TestCase testID="ArrayList_Method_AddItemAt1" keywords="[ArrayList, Method, addItemAt]">
+       <body>
+        <RunCode code="application.airportCollection.addItemAt(obj2, 1);" />
+        <AssertMethodValue method="value = (application.airportCollection.getItemAt(1).abbreviation ==
+        obj2.abbreviation )"   value="true" />
+
+       </body>
+        </TestCase>
+
+    <TestCase testID="ArrayList_Method_AddItemAtBeforeBeginning" keywords="[ArrayList, Method, addItemAt]">
+       <body>
+        <AssertMethodValue method="value = 0; try
+        { application.airportCollection.addItemAt(obj2, -1); }
+        catch (e:Error) { value = e.message }"
+        value="Index '-1' specified is out of bounds." />
+       </body>
+        </TestCase>
+
+    <TestCase testID="ArrayList_Method_removeItemAt" keywords="[ArrayList, Method, removeItemAt]">
+       <body>
+        <AssertPropertyValue target="airportCollection" propertyName ="length" value="15"/>
+        <AssertMethodValue method="var obj:Object = application.airportCollection.getItemAt(3);
+        value = (application.airportCollection.removeItemAt(3).abbreviation ==
+        obj.abbreviation )"   value="true" />
+        <AssertPropertyValue target="airportCollection" propertyName ="length" value="14"/>
+       </body>
+        </TestCase>
+
+
+    <TestCase testID="ArrayList_Method_addAll" keywords="[ArrayList, Method, addAll]">
+       <body>
+        <AssertPropertyValue target="al" propertyName ="length" value="0"/>
+        <RunCode code="application.al.addAll(application.playerList)" />
+        <AssertPropertyValue target="al" propertyName ="length" value="7"/>
+       </body>
+   </TestCase>
+    <TestCase testID="ArrayList_Method_addAllAt" keywords="[ArrayList, Method, addAllAt]">
+       <body>
+        <RunCode code="application.al.removeAll()" />
+        <AssertPropertyValue target="al" propertyName ="length" value="0"/>
+        <RunCode code="application.al.addAllAt(application.playerList,0)" />
+        <AssertPropertyValue target="al" propertyName ="length" value="7"/>
+       </body>
+   </TestCase>
+    <TestCase testID="ArrayList_Method_addAllAt_end" keywords="[ArrayList, Method, addAllAt]">
+       <body>
+        <RunCode code="application.al.removeAll()" />
+        <AssertPropertyValue target="al" propertyName ="length" value="0"/>
+        <RunCode code="application.al.addAllAt(application.playerList,0)" />
+        <AssertPropertyValue target="al" propertyName ="length" value="7"/>
+        <RunCode code="application.al.addAllAt(application.playerList,7)" />
+        <AssertPropertyValue target="al" propertyName ="length" value="14"/>
+       </body>
+   </TestCase>
+    </testCases>
+</UnitTester>
\ No newline at end of file

Added: incubator/flex/trunk/mustella/tests/collections/ArrayList/Properties/ArrayList_Properties.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/ArrayList/Properties/ArrayList_Properties.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/ArrayList/Properties/ArrayList_Properties.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/ArrayList/Properties/ArrayList_Properties.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,65 @@
+<?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="collections/ArrayList/Properties/"  xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="http://ns.adobe.com/mxml/2009" xmlns:m="http://ns.adobe.com/mxml/2009" xmlns="*" testSWF="ArrayListMain.mxml">
+	<m:Script>
+	<![CDATA[
+	
+	public static function init(o:DisplayObject):void
+	{
+
+	}					
+	]]>
+	</m:Script>
+	<m:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</m:Metadata>	
+
+	
+
+	<m:Script>
+	<![CDATA[
+
+        import mx.collections.ArrayList;
+        import mx.collections.IList;
+	
+	]]>
+	</m:Script>
+  
+    <testCases>
+    
+      	<TestCase testID="ArrayList_Property_length_dataGrid" keywords="[ArrayList, Property,length]">
+	   <body>
+	   	<AssertPropertyValue target="dg.dataProvider" propertyName ="length" value="7"/> 
+           	<SetProperty  target="dg" propertyName ="selectedIndex" value="6"/>
+           	<AssertPropertyValue target="dg.selectedItem" propertyName ="team" value="Team B"/>
+           	<AssertPropertyValue target="dg.selectedItem" propertyName ="lastName" value="PlayerG"/>
+		<SetProperty  target="dg" propertyName ="selectedIndex" value="0"/>
+           	<AssertPropertyValue target="dg.selectedItem" propertyName ="team" value="Team A"/>
+           	<AssertPropertyValue target="dg.selectedItem" propertyName ="lastName" value="PlayerA"/>
+	              	
+	   </body>
+        </TestCase> 
+
+      	
+        
+    </testCases>
+</UnitTester>
\ No newline at end of file

Added: incubator/flex/trunk/mustella/tests/collections/ArrayList/SWFs/ArrayListMain.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/ArrayList/SWFs/ArrayListMain.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/ArrayList/SWFs/ArrayListMain.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/ArrayList/SWFs/ArrayListMain.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,64 @@
+<?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" xmlns:mx="http://www.adobe.com/2006/mxml" >
+
+<mx:Script>
+    <![CDATA[
+
+        import mx.collections.ArrayList;
+        import mx.collections.IList;
+        [Bindable]
+    public var ac:ArrayList;
+
+    public var players:Array=[
+                {team:"Team A",jerseyNumber:80,lastName:"PlayerA",firstName:"T"},
+                {team:"Team B",jerseyNumber:7, lastName:"PlayerB",firstName:"B"},
+                {team:"Team A",jerseyNumber:12, lastName:"PlayerC",firstName:"T"},
+                {team:"Team A",jerseyNumber:21,lastName:"PlayerD",firstName:"R"},
+                {team:"Team C",jerseyNumber:34, lastName:"PlayerE",firstName:"D"},
+                {team:"Team A",jerseyNumber:12, lastName:"PlayerF",firstName:"A"},
+                {team:"Team B",jerseyNumber:7, lastName:"PlayerG",firstName:"B"},
+        ];
+    public var al:ArrayList = new ArrayList();
+    public var playerList:ArrayList = new ArrayList(players);
+
+    public var airportCollection:ArrayList= new ArrayList( [
+            {abbreviation:"IAH", name:"Houston", international:"true"},
+            {abbreviation:"BOS", name:"Boston" ,international:"true"},
+                {abbreviation:"MHT", name:"Manchester", international:"false"},
+                {abbreviation:"JAX", name:"Jacksonville", international:"false"},
+                {abbreviation:"CVG", name:"Cincinatti", international:"false"},
+                {abbreviation:"ATL", name:"Atlanta" ,international:"true"},
+                {abbreviation:"CDG", name:"Paris", international:"true"},
+                {abbreviation:"JFK", name:"New York", international:"true"},
+                {abbreviation:"LAX", name:"Los Angeles", international:"true"},
+                {abbreviation:"HND", name:"Tokyo", international:"true"},
+                    {abbreviation:"SFO", name:"San Francisco", international:"true"},
+                    {abbreviation:"SJO", name:"San Jose", international:"false"}
+    ]);
+
+     ]]>
+</mx:Script>
+
+
+<mx:DataGrid id="dg" dataProvider="{new ArrayList(players)}" />
+
+
+</mx:Application>
\ No newline at end of file

Added: incubator/flex/trunk/mustella/tests/collections/IViewCursor/Methods/IViewCursor_Methods.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/IViewCursor/Methods/IViewCursor_Methods.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/IViewCursor/Methods/IViewCursor_Methods.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/IViewCursor/Methods/IViewCursor_Methods.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,271 @@
+<?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="collections/IViewCursor/Methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="IViewCursorMain.mxml">
+	<mx:Script>
+	<![CDATA[
+	
+	public static function init(o:DisplayObject):void
+	{
+
+	}					
+	]]>
+	</mx:Script>
+	<mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</mx:Metadata>	
+
+	
+
+	<mx:Script>
+	<![CDATA[
+	import mx.collections.*;
+	public var cursor:IViewCursor;
+        public var boundCursor:IViewCursor;
+        
+     
+	]]>
+	</mx:Script>
+  
+    <testCases>
+    
+    	<TestCase testID="IViewCursor_Method_Seek_Last" keywords="[IViewCursor, Method, seek]">
+ 	   <setup>
+		<RunCode code="cursor = application.airportCollection.createCursor()" />
+	   </setup>
+	   <body>
+		<AssertMethodValue method=" script:cursor.seek(CursorBookmark.LAST);value=cursor.current.abbreviation "   value="HND" />
+	   </body>	   
+        </TestCase>
+        
+    	<TestCase testID="IViewCursor_Method_Seek_First" keywords="[IViewCursor, Method, seek]">
+ 	   <setup>
+		<RunCode code="cursor = application.airportCollection.createCursor()" />
+	   </setup>
+	   <body>
+		<AssertMethodValue method=" script:cursor.seek(CursorBookmark.FIRST);value=cursor.current.abbreviation "   value="IAH" />
+	   </body>	   
+        </TestCase> 
+        
+    	<TestCase testID="IViewCursor_Method_MoveNext" keywords="[IViewCursor, Method, moveNext]">
+ 	   <setup>
+		<RunCode code="cursor = application.airportCollection.createCursor();" />
+	   </setup>
+	   <body>
+		<AssertMethodValue method=" script:cursor.moveNext();value=cursor.current.abbreviation "   value="BOS" />
+	   </body>	   
+        </TestCase> 
+        
+   	<TestCase testID="IViewCursor_Method_MovePrevious" keywords="[IViewCursor, Method, movePrevious]">
+ 	   <setup>
+		<RunCode code="cursor = application.airportCollection.createCursor();script:cursor.moveNext();script:cursor.moveNext();" />
+	   </setup>
+	   <body>
+		<AssertMethodValue method=" script:cursor.movePrevious();value=cursor.current.abbreviation "   value="BOS" />
+	   </body>	   
+        </TestCase>
+        
+    	<TestCase testID="IViewCursor_Property_current_bound" keywords="[IViewCursor, Property, current">
+	   <setup>
+	   	<RunCode code="boundCursor = application.airportCollectionBound.createCursor()" />
+
+	   </setup>
+ 	   <body>
+		<AssertMethodValue method="script:boundCursor.seek(CursorBookmark.FIRST);value=boundCursor.current.abbreviation" value="IAH" />
+		
+	   </body>
+        </TestCase>  
+    	<TestCase testID="IViewCursor_Property_last_bound" keywords="[IViewCursor, Property, current">
+	   <setup>
+	   	<RunCode code="boundCursor = application.airportCollectionBound.createCursor()" />
+
+	   </setup>
+ 	   <body>
+		<AssertMethodValue method="script:boundCursor.seek(CursorBookmark.LAST);value=boundCursor.current.abbreviation" value="JAX" />
+		
+	   </body>
+        </TestCase>
+    	<TestCase testID="IViewCursor_Method_MoveNext_bound" keywords="[IViewCursor, Method, moveNext]">
+ 	   <setup>
+		<RunCode code="boundCursor = application.airportCollectionBound.createCursor();" />
+	   </setup>
+	   <body>
+		<AssertMethodValue method=" script:boundCursor.seek(CursorBookmark.FIRST);
+		script:boundCursor.moveNext();script:boundCursor.moveNext();
+		value=boundCursor.current.abbreviation "   value="MHT" />
+	   </body>	   
+        </TestCase>
+        
+    	<TestCase testID="IViewCursor_Method_MovePrevious_bound" keywords="[IViewCursor, Method, movePrevious]">
+ 	   <setup>
+ 	   	
+		<RunCode code="boundCursor = application.airportCollectionBound.createCursor();" />
+	   </setup>
+	   <body>
+		<AssertMethodValue method=" script:boundCursor.seek(CursorBookmark.FIRST);
+		script:boundCursor.moveNext();script:boundCursor.moveNext();script:boundCursor.movePrevious();
+		value=boundCursor.current.abbreviation "   value="BOS" />
+		<AssertPropertyValue target="dg.dataProvider" propertyName ="length" value="4"/>
+		<AssertPropertyValue target="dgac.dataProvider" propertyName ="length" value="10"/>
+	   </body>	   
+        </TestCase>
+        
+   	<TestCase testID="IViewCursor_Method_seek_sorted" keywords="[IViewCursor, Method, seek]">
+ 	   <setup>
+		<RunCode code="cursor = application.airportCollectionSorted.createCursor();" />
+	   </setup>
+	   <body>
+	   	<AssertMethodValue method=" script:cursor.seek(CursorBookmark.FIRST);value=cursor.current.abbreviation "   value="IAH" />
+	    	<AssertMethodValue method=" script:cursor.moveNext();value=cursor.current.abbreviation "   value="JAX" />
+	    	<AssertMethodValue method=" script:cursor.moveNext();value=cursor.current.abbreviation "   value="LAX" />
+	    	<AssertMethodValue method=" script:cursor.moveNext();value=cursor.current.abbreviation "   value="MHT" />
+	    	<AssertMethodValue method=" script:cursor.moveNext();value=cursor.current.abbreviation "   value="JFK" />
+	    	<AssertMethodValue method=" script:cursor.seek(CursorBookmark.LAST);value=cursor.current.abbreviation "   value="JFK" />
+	    	
+	     </body>	   
+        </TestCase>
+
+   	<TestCase testID="IViewCursor_Method_Move_as" keywords="[IViewCursor, Method, move]">
+ 	   <setup>
+		<RunCode code="cursor = application.airportCol_as.createCursor();" />
+	   </setup>
+	   <body>
+		<AssertMethodValue method=" script:cursor.seek(CursorBookmark.FIRST);value=cursor.current.abbreviation " value="IAH" />
+		<AssertMethodValue method=" script:cursor.moveNext(); script:cursor.moveNext();value=cursor.current.abbreviation " value="MHT" />
+		<AssertMethodValue method=" script:cursor.movePrevious();value=cursor.current.abbreviation " value="BOS" />
+		<AssertMethodValue method=" script:cursor.seek(CursorBookmark.LAST);value=cursor.current.abbreviation " value="HND" />
+		<AssertPropertyValue target="airportCol_as" propertyName ="length" value="10"/>
+	   </body>	   
+        </TestCase>
+
+    	<TestCase testID="IViewCursor_Method_XML_MoveNextPrevious" keywords="[IViewCursor, Method, moveNext, movePrevious]">
+ 	   <setup>
+		<RunCode code="application.initEmployees()" />
+	   </setup>
+	   <body>
+	   	<AssertPropertyValue target="colXML_AS" propertyName ="length" value="4"/>
+		<AssertMethodValue method=" application.cursorXML_AS.moveNext(); application.cursorXML_AS.moveNext();
+		value=application.cursorXML_AS.current['first-name'] "   value="Cathy" />
+		<AssertMethodValue method="application.cursorXML_AS.movePrevious();
+		value=application.cursorXML_AS.current['first-name'] "   value="Anders" />
+	   </body>	   
+        </TestCase>
+  
+  	<TestCase testID="IViewCursor_Method_XML_Sort" keywords="[IViewCursor, Method, sort]">
+   	   <setup>
+  		<RunCode code="application.initEmployees()" />
+  	   </setup>
+  	   <body>
+    		<AssertMethodValue method="value=application.cursorXML_AS.current['last-name'] " value="PersonA" />
+    		<AssertMethodValue method="application.cursorXML_AS.moveNext(); value=application.cursorXML_AS.current['last-name'] " value="PersonB" />
+    		<AssertMethodValue method="application.cursorXML_AS.moveNext(); value=application.cursorXML_AS.current['last-name'] " value="PersonC" />
+  	  	<AssertMethodValue method="application.cursorXML_AS.moveNext(); value=application.cursorXML_AS.current['last-name'] " value="PersonD" />
+  	  
+  	   </body>	   
+        </TestCase>
+
+  	<TestCase testID="IViewCursor_Method_XML_Cursor_Bookmark" keywords="[IViewCursor, Method, sort, bookmark]">
+   	   <setup>
+  		<RunCode code="application.initEmployees()" />
+  	   </setup>
+  	   <body>
+    		<AssertMethodValue method="application.cursorXML_AS.seek(CursorBookmark.CURRENT, 2);
+    		var bookmark:CursorBookmark = application.cursorXML_AS.bookmark;
+    		value=bookmark.value.@id " value="3333-333-3333" />
+   	   </body>	   
+        </TestCase>
+
+	<TestCase testID="IViewCursor_Method_XML_Sort_Cursor_Bookmark" keywords="[IViewCursor, Method, sort, bookmark]">
+   	   <setup>
+  		<RunCode code="application.initEmployees()" />
+  	   </setup>
+  	   <body>
+    		<AssertMethodValue method="application.cursorXML_AS.seek(CursorBookmark.CURRENT, 2);
+    		var bookmark:CursorBookmark = application.cursorXML_AS.bookmark;
+    		var s:Sort = new Sort();
+		s.fields = [new SortField('@id')];
+        	application.colXML_AS.sort = s;
+        	application.cursorXML_AS.seek(bookmark);
+    		value=application.cursorXML_AS.current.@id " value="3333-333-3333" />
+   	   </body>	   
+        </TestCase>
+        
+   	<TestCase testID="IViewCursor_Method_Array_MoveNextPrevious" keywords="[IViewCursor, Method, moveNext, movePrevious]">
+    	   <setup>
+   		<RunCode code="application.initPlayers()" />
+   	   </setup>
+   	   <body>
+   	   	<AssertPropertyValue target="colArr_AS" propertyName ="length" value="12"/>
+   		<AssertMethodValue method=" application.cursorArr_AS.moveNext(); application.cursorArr_AS.moveNext();
+   		value=application.cursorArr_AS.current.firstName "   value="Willie" />
+   		<AssertMethodValue method="application.cursorArr_AS.movePrevious();
+   		value=application.cursorArr_AS.current.firstName "   value="Troy" />
+   	   </body>	   
+        </TestCase>
+        
+   	
+        
+   	<TestCase testID="IViewCursor_Method_Array_UpdateSort" keywords="[IViewCursor, Method, sort,update]">
+    	   <setup>
+   		<RunCode code="application.initPlayers()" />
+   		<RunCode code=" var sort:Sort = new Sort();
+				sort.fields = [new SortField('lastName')];
+				application.colArr_AS.sort = sort;
+				application.colArr_AS.refresh();" />
+   	   </setup>
+   	   <body>
+   	 	<AssertMethodValue method="value =  application.colArr_AS.getItemAt(2).lastName;" value="PlayerC" />
+   		<AssertMethodValue method=" var oldLast:String = application.players[5].lastName;
+        					application.players[5].lastName = 'AAbleton';
+        				        application.colArr_AS.itemUpdated(application.players[5], 'lastName', oldLast, 'AAbleton');
+   		value=application.colArr_AS.getItemAt(2).lastName; "   value="PlayerB" />
+   		<AssertMethodValue method="value =  application.colArr_AS.getItemAt(0).lastName;" value="AAbleton" />
+   		<AssertPropertyValue target="colArr_AS" propertyName ="length" value="12"/>
+   	   </body>	   
+        </TestCase>  
+        
+   	<TestCase testID="IViewCursor_Method_Seek_Last_First_Current" keywords="[IViewCursor, Method, seek]">
+ 	   <setup>
+		<RunCode code="cursor = application.arrColInline.createCursor()" />
+	   </setup>
+	   <body>
+		<AssertMethodValue method=" script:cursor.seek(CursorBookmark.FIRST); value=cursor.current.lastName "   value="PlayerA" />
+		<AssertMethodValue method=" script:cursor.seek(CursorBookmark.LAST); value=cursor.current.lastName "   value="PlayerK" />
+		<AssertMethodValue method=" script:cursor.seek(CursorBookmark.FIRST, 1); value=cursor.current.lastName "   value="PlayerB" />
+		<AssertMethodValue method=" script:cursor.seek(CursorBookmark.CURRENT, 1); value=cursor.current.lastName "   value="PlayerC" />
+	
+	   </body>	   
+        </TestCase>
+        
+  	<TestCase testID="IViewCursor_Method_FindAny" keywords="[IViewCursor, Method, findAny]">
+ 	   <setup>
+ 	   	<RunCode code="application.initPlayers()" />
+		
+	   </setup>
+	   <body>
+		<AssertMethodValue method=" var test:Object = new Object();test.jerseyNumber = '12';
+		application.cursorArr_AS.findAny(test); 
+		value=application.cursorArr_AS.current.lastName "   value="PlayerB" />
+		
+	   </body>	   
+        </TestCase>       
+   </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/collections/IViewCursor/Properties/IViewCursor_Properties.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/IViewCursor/Properties/IViewCursor_Properties.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/IViewCursor/Properties/IViewCursor_Properties.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/IViewCursor/Properties/IViewCursor_Properties.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,102 @@
+<?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="collections/IViewCursor/Properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="IViewCursorMain.mxml">
+	<mx:Script>
+	<![CDATA[
+	
+	public static function init(o:DisplayObject):void
+	{
+
+	}					
+	]]>
+	</mx:Script>
+	<mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</mx:Metadata>	
+
+	
+
+	<mx:Script>
+	<![CDATA[
+	import mx.collections.*;
+	public var cursor:IViewCursor;
+        public var boundCursor:IViewCursor;
+ 
+	]]>
+	</mx:Script>
+  
+    <testCases>
+    
+    	<TestCase testID="IViewCursor_Property_current" keywords="[IViewCursor, Property, current">
+	   <setup>
+	   	<RunCode code="cursor = application.airportCollection.createCursor()" />
+
+	   </setup>
+ 	   <body>
+		<AssertPropertyValue target="script:cursor.current" propertyName="abbreviation" value="IAH"/>
+	   </body>
+        </TestCase>
+        
+    	<TestCase testID="IViewCursor_Property_cursor_current" keywords="[IViewCursor, Property, current, cursor">
+ 	   <body>
+ 	   	<AssertPropertyValue target="airportCodeCursor.current" propertyName="abbreviation" value="IAH"/>
+	   	<AssertPropertyValue target="dgArray.dataProvider" propertyName="length" valueExpression = "value=application.airportCodes_as.length"/>
+	   	<AssertPropertyValue target="dgArray.dataProvider" propertyName="length" valueExpression = "value=application.airportListCollectionView.length"/>
+	  
+	   </body>
+        </TestCase>
+        
+    	<TestCase testID="IViewCursor_Property_cursor_current_last" keywords="[IViewCursor, Property, current, cursor">
+	   <setup>
+	   	<RunCode code="application.airportCodeCursor.seek(CursorBookmark.LAST);" />
+	   </setup>
+ 	   <body>
+		<AssertPropertyValue target="airportCodeCursor.current" propertyName="abbreviation" value="HND"/>
+	   </body>
+        </TestCase>
+        
+	<TestCase testID="IViewCursor_Property_cursor_current_first" keywords="[IViewCursor, Property, current, cursor">
+	   <setup>
+	   	<RunCode code="application.airportCodeCursor.seek(CursorBookmark.FIRST);" />
+	   </setup>
+ 	   <body>
+		<AssertPropertyValue target="airportCodeCursor.current" propertyName="abbreviation" value="IAH"/>
+	   </body>
+        </TestCase> 
+	<TestCase testID="IViewCursor_Property_cursor_current_moveNext" keywords="[IViewCursor, Property, moveNext, cursor">
+	   <setup>
+	   	<RunCode code="application.airportCodeCursor.moveNext();application.airportCodeCursor.moveNext();" />
+	   </setup>
+ 	   <body>
+		<AssertPropertyValue target="airportCodeCursor.current" propertyName="abbreviation" value="MHT"/>
+	   </body>
+        </TestCase> 
+	<TestCase testID="IViewCursor_Property_cursor_current_movePrevious" keywords="[IViewCursor, Property, movePrevious, cursor">
+	   <setup>
+	   	<RunCode code="application.airportCodeCursor.movePrevious();" />
+	   </setup>
+ 	   <body>
+		<AssertPropertyValue target="airportCodeCursor.current" propertyName="abbreviation" value="BOS"/>
+	   </body>
+        </TestCase>         
+   </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/collections/IViewCursor/SWFs/IViewCursorMain.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/IViewCursor/SWFs/IViewCursorMain.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/IViewCursor/SWFs/IViewCursorMain.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/IViewCursor/SWFs/IViewCursorMain.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+  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"  xmlns:mx="http://www.adobe.com/2006/mxml" >
+
+<mx:Script>
+    <![CDATA[
+        
+        import mx.collections.*;
+        
+        [Bindable]
+	public var airportCodes_as:Array=[{abbreviation:"IAH",name:"Houston"}, {abbreviation:"BOS", name:"Boston"},
+	            {abbreviation:"MHT",name:"Manchester"}, {abbreviation:"JAX", name:"Jacksonville"},
+	            {abbreviation:"CVG", name:"Cincinatti"}, {abbreviation:"ATL", name:"Atlanta"},
+	            {abbreviation:"CDG", name:"Paris"}, {abbreviation:"JFK", name:"New York"},
+            	    {abbreviation:"LAX", name:"Los Angeles"}, {abbreviation:"HND", name:"Tokyo"}];
+        
+        [Bindable]
+        public var airportCol_as:ArrayCollection = new ArrayCollection(airportCodes_as);
+        
+        [Bindable]
+	public var airportListCollectionView:ListCollectionView = new ListCollectionView(airportCol_as);
+        
+        public var airportCodeCursor:IViewCursor = airportListCollectionView.createCursor();
+        
+	public function filterFunc(item:Object):Boolean
+	{
+		return item.name >= "Houston" && item.name <= "New York";
+	}
+	
+   	public var xmlData:XML =
+    	<root>
+            <!-- I am a comment above employee -->
+        	<employee id="1111-111-1111">
+        	    <!-- I am a nested comment -->
+        		<first-name>Bob</first-name>
+        		<last-name>PersonA</last-name>
+        		<age>25</age>
+                <address>
+                    <street>111 Main</street>
+                </address>
+        	</employee>
+        	<employee id="2222-222-2222">
+        		<first-name>Anders</first-name>
+        		<last-name>PersonB</last-name>
+        		<age>26</age>
+                <address>
+                    <street>222 Main</street>
+                </address>
+        	</employee>
+        	<employee id="3333-333-3333">
+        		<first-name>Cathy</first-name>
+        		<last-name>PersonC</last-name>
+        		<age>22</age>
+                <address>
+                    <street>333 Main</street>
+                </address>
+        	</employee>
+        	<employee id="3333-333-3333">
+        		<first-name>Smith</first-name>
+        		<last-name>PersonD</last-name>
+        		<age>32</age>
+                <address>
+                    <street>444 Main</street>
+                </address>
+        	</employee>
+        </root>;
+
+    	[Bindable]
+	public var players:Array =
+            [{jerseyNumber:"80",lastName:"PlayerA",firstName:"Troy"},
+            {jerseyNumber:"12", lastName:"PlayerB",firstName:"Tom"},
+            {jerseyNumber:"21",lastName:"PlayerC",firstName:"Randall"},
+            {jerseyNumber:"7", lastName:"PlayerD",firstName:"Doug"},
+            {jerseyNumber:"4", lastName:"PlayerE",firstName:"Adam"},
+            {jerseyNumber:"54", lastName:"PlayerF",firstName:"Tedy"},
+            {jerseyNumber:"93", lastName:"PlayerG",firstName:"Richard"},
+            {jerseyNumber:"50", lastName:"PlayerH",firstName:"Mike"},
+            {jerseyNumber:"7", lastName:"PlayerI",firstName:"Chris"},
+            {jerseyNumber:"55", lastName:"PlayerJ",firstName:"Willie"},
+            {jerseyNumber:"2", lastName:"PlayerD",firstName:"Doug"},
+            {jerseyNumber:"28", lastName:"PlayerK",firstName:"Corey"}];
+
+	    public var colXML_AS:XMLListCollection = new XMLListCollection(xmlData.employee);
+	    public var colArr_AS:ArrayCollection = new ArrayCollection(players);
+	    public var cursorXML_AS:IViewCursor;
+	    public var cursorArr_AS:IViewCursor;
+	    public var cursorArr_Airport:IViewCursor;
+	    public var cursorArr_Inline:IViewCursor ;
+	    
+	    public function initPlayers():void 
+	    {
+ 	                var sortArr:Sort = new Sort();
+	                var f:SortField = new SortField("jerseyNumber");
+	                f.descending = true;
+	                f.numeric = true;
+	                sortArr.fields = [f];
+	                colArr_AS.sort = sortArr;
+	                colArr_AS.refresh();
+	                cursorArr_AS = colArr_AS.createCursor();
+	    }
+	    
+	    public function initEmployees():void 
+	    {
+	                //apply the appropriate Sorts
+	                var sortXML:Sort = new Sort();
+	                sortXML.fields=[new SortField("last-name")];
+	                colXML_AS.sort=sortXML;
+	                colXML_AS.refresh();
+ 	                cursorXML_AS = colXML_AS.createCursor();
+ 	    }
+     ]]>
+</mx:Script>
+
+	<mx:ArrayCollection id="airportCollection">
+	  <mx:source>
+		<mx:Array>
+		    <mx:Object abbreviation="IAH" name="Houston" international="true"/>
+		    <mx:Object abbreviation="BOS" name="Boston" international="true"/>
+	            <mx:Object abbreviation="MHT" name="Manchester" international="false"/>
+	            <mx:Object abbreviation="JAX" name="Jacksonville" international="false"/>
+	            <mx:Object abbreviation="CVG" name="Cincinatti" international="false"/>
+	            <mx:Object abbreviation="ATL" name="Atlanta" international="true"/>
+	            <mx:Object abbreviation="CDG" name="Paris" international="true"/>
+	            <mx:Object abbreviation="JFK" name="New York" international="true"/>
+	            <mx:Object abbreviation="LAX" name="Los Angeles" international="true"/>
+	            <mx:Object abbreviation="HND" name="Tokyo" international="true"/>
+    		</mx:Array>
+	  </mx:source>
+	</mx:ArrayCollection>
+	
+	<mx:Array id="airportCodes">
+		<mx:Object abbreviation="IAH" name="Houston"/>
+		<mx:Object abbreviation="BOS" name="Boston"/>
+        	<mx:Object abbreviation="MHT" name="Manchester"/>
+        	<mx:Object abbreviation="JAX" name="Jacksonville"/>
+	</mx:Array>
+
+	<mx:ArrayCollection id="airportCollectionBound">
+		<mx:source>{airportCodes}</mx:source>
+	</mx:ArrayCollection>
+	
+	<mx:ArrayCollection id="airportCollectionSorted" filterFunction="filterFunc">
+	  <mx:source>
+		<mx:Array>
+		    <mx:Object abbreviation="IAH" name="Houston" international="true"/>
+		    <mx:Object abbreviation="BOS" name="Boston" international="true"/>
+	            <mx:Object abbreviation="MHT" name="Manchester" international="false"/>
+	            <mx:Object abbreviation="JAX" name="Jacksonville" international="false"/>
+	            <mx:Object abbreviation="CVG" name="Cincinatti" international="false"/>
+	            <mx:Object abbreviation="ATL" name="Atlanta" international="true"/>
+	            <mx:Object abbreviation="CDG" name="Paris" international="true"/>
+	            <mx:Object abbreviation="JFK" name="New York" international="true"/>
+	            <mx:Object abbreviation="LAX" name="Los Angeles" international="true"/>
+	            <mx:Object abbreviation="HND" name="Tokyo" international="true"/>
+    		</mx:Array>
+	  </mx:source>
+		<mx:sort>
+		    <mx:Sort>
+			<mx:fields>
+			    <mx:Array>
+				<mx:SortField name="name"/>
+			    </mx:Array>
+			</mx:fields>
+		    </mx:Sort>
+		</mx:sort>	  
+	</mx:ArrayCollection>
+	
+<mx:DataGrid id="dgac" dataProvider="{airportCollection}"/>
+<mx:DataGrid id="dg" dataProvider="{airportCollectionBound}"/>
+
+<mx:DataGrid id="dgArray" dataProvider="{airportCodes_as}" />
+
+<mx:ArrayCollection id="arrColInline">
+    <mx:source>{players}</mx:source>
+</mx:ArrayCollection>
+
+
+<mx:DataGrid id="dgACFullyInline">
+    <mx:dataProvider>
+        <mx:ArrayCollection id="airportCol" filterFunction="filterFunc">
+		<mx:source>
+			<mx:Array>
+			    <mx:Object abbreviation="IAH" name="Houston"/>
+			    <mx:Object abbreviation="BOS" name="Boston"/>
+			    <mx:Object abbreviation="MHT" name="Manchester"/>
+			    <mx:Object abbreviation="JAX" name="Jacksonville"/>
+			    <mx:Object abbreviation="CVG" name="Cincinatti"/>
+			    <mx:Object abbreviation="ATL" name="Atlanta"/>
+			    <mx:Object abbreviation="CDG" name="Paris"/>
+			    <mx:Object abbreviation="JFK" name="New York"/>
+			    <mx:Object abbreviation="LAX" name="Los Angeles"/>
+			    <mx:Object abbreviation="HND" name="Tokyo"/>
+			</mx:Array>
+		</mx:source>
+		<mx:sort>
+            <mx:Sort>
+                <mx:fields>
+                    <mx:Array>
+                         <mx:SortField name="name" />
+                    </mx:Array>
+                </mx:fields>
+            </mx:Sort>
+        </mx:sort>
+	    </mx:ArrayCollection>
+    </mx:dataProvider>
+</mx:DataGrid>
+
+</mx:Application>
\ No newline at end of file

Added: incubator/flex/trunk/mustella/tests/collections/ListCollectionView/Methods/ListCollectionView_Methods.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/ListCollectionView/Methods/ListCollectionView_Methods.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/ListCollectionView/Methods/ListCollectionView_Methods.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/ListCollectionView/Methods/ListCollectionView_Methods.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,248 @@
+<?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="collections/ListCollectionView/Methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="ListCollectionViewMain.mxml">
+    <mx:Script>
+    <![CDATA[
+
+    public static function init(o:DisplayObject):void
+    {
+
+    }
+    ]]>
+    </mx:Script>
+    <mx:Metadata>
+    <![CDATA[
+        [Mixin]
+    ]]>
+    </mx:Metadata>
+
+    <mx:Script>
+    <![CDATA[
+    import mx.collections.*;
+    public var obj1:Object ;
+        public var obj2:Object ;
+
+    public function do_disableAutoUpdate():void
+    {
+                application.airportCollection.disableAutoUpdate();
+                application.view1.disableAutoUpdate();
+                application.view2.disableAutoUpdate();
+        }
+        public function testEditView1():void
+        {
+            obj1= application.view1.getItemAt(2);
+            obj1.international = true;
+            obj1.abbreviation = "SJXX"
+            application.view1.itemUpdated(obj1);
+
+            application.view1.enableAutoUpdate();
+            application.view1.refresh();
+
+            obj2 = IList(application.grid1.dataProvider).getItemAt(11);
+
+         }
+
+        //should cause a re-range - BUG 146748
+        public function testEditView2():void
+        {
+            obj1 = application.view2.getItemAt(2);
+            obj1.name = "Albequerque";
+            application.view2.itemUpdated(obj1);
+
+            application.view2.enableAutoUpdate();
+            application.view2.refresh();
+
+         }
+    ]]>
+    </mx:Script>
+
+    <testCases>
+
+        <TestCase testID="ArrayCollection_Method_disableAutoUpdate_bug_146748" keywords="[ArrayCollection, Method, disableAutoUpdate,bug_146748">
+            <setup>
+                <RunCode code="do_disableAutoUpdate()" />
+            </setup>
+       <body>
+        <RunCode code="testEditView1()" />
+        <AssertPropertyValue target="script:obj2" propertyName="abbreviation" value="SJXX"/>
+        <AssertPropertyValue target="script:obj2" propertyName="international" value="true"/>
+       </body>
+        </TestCase>
+
+        <TestCase testID="ArrayCollection_Method_disableAutoUpdate" keywords="[ArrayCollection, Method, disableAutoUpdate">
+            <setup>
+                <RunCode code="do_disableAutoUpdate()" />
+            </setup>
+       <body>
+        <RunCode code="testEditView2()" />
+        <AssertPropertyValue target="view2" propertyName="length" value="2"/>
+       </body>
+        </TestCase>
+
+        <TestCase testID="ListCollectionView_Method_contains" keywords="[ListCollectionView, Method, contains">
+            <setup>
+                <RunCode code="application.createCollections()" />
+            </setup>
+       <body>
+        <RunCode code="application.view.disableAutoUpdate(); application.col.getItemAt(0).Artist = 'ArtistZ';" />
+        <AssertMethodValue method="value = application.view.contains(application.col.getItemAt(0))" value="true" />
+        <AssertMethodValue method="value = application.view.contains(application.arr[0])" value="true" />
+        <AssertMethodValue method="application.view.enableAutoUpdate(); value = application.view.contains(application.col.getItemAt(0))" value="true" />
+        </body>
+        </TestCase>
+
+    <TestCase testID="ListCollectionView_Method_filterFunction" keywords="[ListCollectionView, Method, filter,getItemAt">
+            <setup>
+                <RunCode code="application.playerView.filterFunction = function (item:Object):Boolean
+                    { return item.jerseyNumber == 7; };
+                    application.playerView.refresh(); " />
+            </setup>
+        <body>
+        <AssertMethodValue method="value = application.playerDG.dataProvider.length" value="4" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(0).jerseyNumber"  value="7" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(1).jerseyNumber" value="7" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(3).jerseyNumber"  value="7" />
+        </body>
+        </TestCase>
+
+    <TestCase testID="ListCollectionView_Method_filterFunction_getItemAt" keywords="[ListCollectionView, Method, filter,getItemAt">
+            <setup>
+                <RunCode code="application.playerView.filterFunction = function (item:Object):Boolean
+                    { return item.team == 'Team A'; };
+                    application.playerView.refresh(); " />
+            </setup>
+        <body>
+        <AssertMethodValue method="value = application.playerDG.dataProvider.length" value="12" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(0).team"  value="Team A" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(11).team" value="Team A" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(6).team"  value="Team A" />
+        </body>
+        </TestCase>
+
+    <TestCase testID="ListCollectionView_Method_Sort_ASC" keywords="[ListCollectionView, Method, filter,getItemAt">
+            <setup>
+                <RunCode code="application.playerView.filterFunction = function (item:Object):Boolean
+                    { return item.team == 'Team A'; };
+                    application.xSort.fields = [new SortField('jerseyNumber', false, false, true)];
+                    application.playerView.sort = application.xSort;
+                    application.playerView.refresh(); " />
+            </setup>
+        <body>
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(0).jerseyNumber"  value="2" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(3).jerseyNumber"  value="7" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(4).jerseyNumber"  value="12" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(11).jerseyNumber"  value="93" />
+        </body>
+        </TestCase>
+
+    <TestCase testID="ListCollectionView_Method_Sort_DescendingSort" keywords="[ListCollectionView, Method, filter,getItemAt">
+            <setup>
+                <RunCode code="application.playerView.filterFunction = function (item:Object):Boolean
+                    { return item.team == 'Team A'; };
+                    application.xSort.fields = [new SortField('jerseyNumber', false, true, true)];
+                    application.playerView.sort = application.xSort;
+                    application.playerView.refresh(); " />
+            </setup>
+        <body>
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(0).jerseyNumber"  value="93" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(3).jerseyNumber"  value="54" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(4).jerseyNumber"  value="50" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(11).jerseyNumber"  value="2" />
+        </body>
+        </TestCase>
+
+    <TestCase testID="ListCollectionView_Method_Sort_twoFiels" keywords="[ListCollectionView, Method, filter,getItemAt,sort">
+            <setup>
+                <RunCode code="application.playerView.filterFunction = function (item:Object):Boolean
+                    { return item.team == 'Team A'; };
+                    application.xSort.fields = [new SortField('jerseyNumber'), new SortField('lastName')];
+                    application.playerView.sort = application.xSort;
+                    application.playerView.refresh(); " />
+            </setup>
+        <body>
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(0).jerseyNumber"  value="2" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(2).jerseyNumber"  value="7" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(2).lastName"  value="PlayerI" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(3).jerseyNumber"  value="7" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(3).lastName"  value="PlayerJ" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(11).jerseyNumber"  value="93" />
+        </body>
+        </TestCase>
+
+    <TestCase testID="ListCollectionView_Method_Sort_twoFielsDesc" keywords="[ListCollectionView, Method, filter,getItemAt,sort">
+            <setup>
+                <RunCode code="application.playerView.filterFunction = function (item:Object):Boolean
+                    { return item.team == 'Team A'; };
+                    application.xSort.fields = [new SortField('jerseyNumber', false, true, true), new SortField('lastName', false, false)];
+                    application.playerView.sort = application.xSort;
+                    application.playerView.refresh(); " />
+            </setup>
+        <body>
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(11).jerseyNumber"  value="2" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(11).lastName"  value="PlayerI" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(9).jerseyNumber"  value="7" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(9).lastName"  value="PlayerJ" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(8).jerseyNumber"  value="7" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(8).lastName"  value="PlayerI" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(0).jerseyNumber"  value="93" />
+        <AssertMethodValue method="value = application.playerDG.dataProvider.getItemAt(0).lastName"  value="PlayerF" />
+        </body>
+        </TestCase>
+
+        <TestCase testID="ListCollectionView_Method_addAll_end" keywords="[ListCollectionView, Method, addAll">
+            <setup>
+                <RunCode code="application.createCollections()" />
+            </setup>
+            <body>
+                <RunCode code="application.view.addAll(new ArrayCollection(application.arr)); " />
+                <AssertPropertyValue target="view" propertyName ="length" value="12"/>
+                <AssertMethodValue method="value = application.view.getItemAt(11).Artist"  value="ArtistF" />
+            </body>
+        </TestCase>
+        <TestCase testID="ListCollectionView_Method_addAllAt_empty" keywords="[ListCollectionView, Method, addAllAt">
+            <body>
+                <RunCode code="application.artCol.addAllAt(new ArrayCollection(application.art),0); " />
+                <AssertPropertyValue target="artCol" propertyName ="length" value="3"/>
+                <AssertMethodValue method="value = application.artCol.getItemAt(2).Artist"  value="ArtistF" />
+            </body>
+        </TestCase>
+        <TestCase testID="ListCollectionView_Method_addAllAt_home" keywords="[ListCollectionView, Method, addAllAt">
+            <body>
+                <RunCode code="application.artCol.addAllAt(new ArrayCollection(application.art),0); " />
+                <AssertPropertyValue target="artCol" propertyName ="length" value="6"/>
+                <AssertMethodValue method="value = application.artCol.getItemAt(2).Artist"  value="ArtistF" />
+            </body>
+        </TestCase>
+        <TestCase testID="ListCollectionView_Method_addAllAt_end" keywords="[ListCollectionView, Method, addAllAt">
+            <body>
+                <RunCode code="application.artCol.addAllAt(new ArrayCollection(application.art),6); " />
+                <AssertPropertyValue target="artCol" propertyName ="length" value="9"/>
+                <AssertMethodValue method="value = application.artCol.getItemAt(8).Artist"  value="ArtistF" />
+            </body>
+        </TestCase>
+        <TestCase testID="ListCollectionView_Method_addAllAt_middle" keywords="[ListCollectionView, Method, addAllAt">
+            <body>
+                <RunCode code="application.artCol.addAllAt(new ArrayCollection(application.art),1); " />
+                <AssertPropertyValue target="artCol" propertyName ="length" value="12"/>
+                <AssertMethodValue method="value = application.artCol.getItemAt(2).Artist"  value="ArtistE" />
+            </body>
+        </TestCase>
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/collections/ListCollectionView/SWFs/ListCollectionViewMain.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/collections/ListCollectionView/SWFs/ListCollectionViewMain.mxml?rev=1370239&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/collections/ListCollectionView/SWFs/ListCollectionViewMain.mxml (added)
+++ incubator/flex/trunk/mustella/tests/collections/ListCollectionView/SWFs/ListCollectionViewMain.mxml Tue Aug  7 13:14:16 2012
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+  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"  xmlns:mx="http://www.adobe.com/2006/mxml" >
+
+<mx:Script>
+    <![CDATA[
+
+        import mx.collections.*;
+        import mx.events.CollectionEvent;
+
+        [Bindable]
+        public var view:ListCollectionView;
+        public var col:ArrayCollection;
+
+        [Bindable]
+        public var arr:Array =   [
+           { Artist:'ArtistA', Price:1.99, Rating:'Excellent' },
+           { Artist:'ArtistB', Price:10.99, Rating:'Excellent' },
+           { Artist:'ArtistC', Price:12.97, Rating:'Excellent' },
+           { Artist:'ArtistD', Price:12.99, Rating:'Good' },
+           { Artist:'ArtistE', Price:11.99, Rating:'Good' },
+           { Artist:'ArtistF', Price:5.14, Rating:'Bad' },
+         ];
+
+        public var art:Array =   [
+           { Artist:'ArtistD', Price:12.99, Rating:'Good' },
+           { Artist:'ArtistE', Price:11.99, Rating:'Good' },
+           { Artist:'ArtistF', Price:5.14, Rating:'Bad' },
+         ];
+        public var artCol:ArrayCollection=new ArrayCollection();
+
+        public function createCollections():void
+        {
+            col = new ArrayCollection(arr);
+            view = new ListCollectionView(col);
+
+        }
+
+        public function filterFunc(item:Object):Boolean
+        {
+            return item.name >= "Paris" && item.name <= "San Jose";
+        }
+
+    public var players:Array =[{team:"Team A",jerseyNumber:80,lastName:"PlayerA",firstName:"Troy"},
+            {team:"Team A",jerseyNumber:12, lastName:"PlayerB",firstName:"Tom"},
+            {team:"Team A",jerseyNumber:21,lastName:"PlayerC",firstName:"Randall"},
+            {team:"Team A",jerseyNumber:4, lastName:"PlayerD",firstName:"Adam"},
+            {team:"Team A",jerseyNumber:54, lastName:"PlayerE",firstName:"Tedy"},
+            {team:"Team A",jerseyNumber:93, lastName:"PlayerF",firstName:"Richard"},
+            {team:"Team A",jerseyNumber:50, lastName:"PlayerG",firstName:"Mike"},
+            {team:"Team A",jerseyNumber:55, lastName:"PlayerH",firstName:"Willie"},
+            {team:"Team A",jerseyNumber:2, lastName:"PlayerI",firstName:"Doug"},
+            {team:"Team A",jerseyNumber:7, lastName:"PlayerI",firstName:"Doug"},
+            {team:"Team A",jerseyNumber:7, lastName:"PlayerJ",firstName:"Chris"},
+            {team:"Team A",jerseyNumber:28, lastName:"PlayerK",firstName:"Corey"},
+            {team:"Team B",jerseyNumber:7, lastName:"PlayerL",firstName:"Byron"},
+            {team:"Team B",jerseyNumber:84, lastName:"PlayerM",firstName:"Chad"},
+            {team:"Team B",jerseyNumber:54, lastName:"PlayerN",firstName:"Mike"},
+            {team:"Team B",jerseyNumber:28, lastName:"PlayerO",firstName:"Fred"},
+            {team:"Team C",jerseyNumber:49, lastName:"PlayerP",firstName:"Tim"},
+            {team:"Team C",jerseyNumber:18, lastName:"PlayerQ",firstName:"Johnny"},
+            {team:"Team C",jerseyNumber:7, lastName:"PlayerR",firstName:"Nixon"},
+            {team:"Team C",jerseyNumber:34, lastName:"PlayerS",firstName:"David"},
+            {team:"Team C",jerseyNumber:33, lastName:"PlayerT",firstName:"Jason"},
+            {team:"Team D",jerseyNumber:44, lastName:"PlayerU",firstName:"Toby"},
+            {team:"Team D",jerseyNumber:2, lastName:"PlayerV",firstName:"Alex"}
+        ];
+
+        public var playerArrayCollection:ArrayCollection = new ArrayCollection(players);
+        [Bindable]
+        public var playerView:ICollectionView = new ListCollectionView(playerArrayCollection);
+        public var xSort:Sort = new Sort();
+
+     ]]>
+</mx:Script>
+
+    <mx:ArrayCollection id="airportCollection">
+      <mx:source>
+        <mx:Array>
+            <mx:Object abbreviation="IAH" name="Houston" international="true"/>
+            <mx:Object abbreviation="BOS" name="Boston" international="true"/>
+                <mx:Object abbreviation="MHT" name="Manchester" international="false"/>
+                <mx:Object abbreviation="JAX" name="Jacksonville" international="false"/>
+                <mx:Object abbreviation="CVG" name="Cincinatti" international="false"/>
+                <mx:Object abbreviation="ATL" name="Atlanta" international="true"/>
+                <mx:Object abbreviation="CDG" name="Paris" international="true"/>
+                <mx:Object abbreviation="JFK" name="New York" international="true"/>
+                <mx:Object abbreviation="LAX" name="Los Angeles" international="true"/>
+                <mx:Object abbreviation="HND" name="Tokyo" international="true"/>
+                    <mx:Object abbreviation="SFO" name="San Francisco" international="true"/>
+                    <mx:Object abbreviation="SJO" name="San Jose" international="false"/>
+        </mx:Array>
+      </mx:source>
+    </mx:ArrayCollection>
+
+    <mx:ListCollectionView id="view1" list="{airportCollection}">
+        <mx:sort>
+                <mx:Sort>
+                    <mx:fields>
+                    <mx:Array>
+                        <mx:SortField name="international" />
+                    </mx:Array>
+                    </mx:fields>
+                </mx:Sort>
+        </mx:sort>
+    </mx:ListCollectionView>
+
+    <mx:ListCollectionView id="view2" list="{airportCollection}" filterFunction="filterFunc">
+        <mx:sort>
+                <mx:Sort>
+                    <mx:fields>
+                    <mx:Array>
+                        <mx:SortField name="name"/>
+                    </mx:Array>
+                    </mx:fields>
+                </mx:Sort>
+        </mx:sort>
+    </mx:ListCollectionView>
+
+    <mx:DataGrid id="grid1" dataProvider="{view1}">
+        <mx:columns>
+        <mx:Array>
+        <mx:DataGridColumn dataField="abbreviation" width="150"/>
+        <mx:DataGridColumn dataField="international" width="200"/>
+        </mx:Array>
+        </mx:columns>
+    </mx:DataGrid>
+
+    <mx:DataGrid id="grid2" dataProvider="{view2}">
+        <mx:columns>
+        <mx:Array>
+        <mx:DataGridColumn dataField="name" width="150"/>
+        <mx:DataGridColumn dataField="international" width="200"/>
+        </mx:Array>
+        </mx:columns>
+    </mx:DataGrid>
+
+       <mx:DataGrid id="playerDG" height="150" width="250" dataProvider= "{playerView}">
+        <mx:columns>
+              <mx:Array>
+                <mx:DataGridColumn headerText="#" dataField="jerseyNumber" width="30" />
+                <mx:DataGridColumn dataField="firstName" width="60" />
+                <mx:DataGridColumn dataField="lastName" />
+                <mx:DataGridColumn dataField="team" />
+              </mx:Array>
+            </mx:columns>
+    </mx:DataGrid>
+
+</mx:Application>
\ No newline at end of file



Mime
View raw message