incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1370380 [5/13] - in /incubator/flex/trunk/mustella/tests/resources: ./ Integration/ Integration/Compiler/ Integration/FrameworkProperties/ Integration/SWFs/ Integration/SWFs/Assets/ Integration/SWFs/Assets/bundles/ Integration/SWFs/Assets/...
Date Tue, 07 Aug 2012 17:34:19 GMT
Added: incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_addResourceBundle.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_addResourceBundle.mxml?rev=1370380&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_addResourceBundle.mxml (added)
+++ incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_addResourceBundle.mxml Tue Aug  7 17:34:13 2012
@@ -0,0 +1,215 @@
+<?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="resources/ResourceManager/Methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="ResourceManagerApp.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.resources.ResourceManager;
+
+        import mx.resources.IResourceManager;
+
+        import mx.resources.ResourceBundle;
+
+        import mx.resources.IResourceBundle;
+
+        
+
+        private function callAddResourceBundle(useBundleName:Boolean, useContent:Boolean):void{
+
+            var newBundle:ResourceBundle;
+
+            
+
+            if(useBundleName) 
+
+                newBundle = new ResourceBundle("fr_FR", "bundle1");
+
+            else
+
+                newBundle = new ResourceBundle();
+
+            
+
+            if(useContent){
+
+                newBundle.content["OPEN"] = "Open";
+
+                newBundle.content["CLOSE"] = "Close";    
+
+            }
+
+        
+
+            ResourceManager.getInstance().addResourceBundle(newBundle);            
+
+        }        
+
+    ]]></mx:Script>
+
+
+
+    <testCases>
+
+    
+
+        <!-- 
+
+            Verify that the locale was added, that the bundle is present, that the bundle has content, and that the
+
+            locale chain has NOT been updated to include the new locale. 
+
+        -->
+
+        <TestCase frequency="all" testID="RTL_ResourceManager_Method_addResourceBundle_WithBundleName_Content" description="Call addResourceBundle() to add a ResourceBundle which has a name and content." keywords="[Runtime Localization,ResourceManager,addResourceBundle]" >
+
+            <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="callAddResourceBundle(true, true)" />
+
+            </setup>
+
+            <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().length" value="1" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().indexOf('fr_FR')" value="0" />                
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').length" value="1" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR')[0]" value="bundle1" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().localeChain.length" value="0" />
+
+                <RunCode code="ResourceManager.getInstance().localeChain.push('fr_FR')" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getString('bundle1','OPEN')" value="Open" />                                                                
+
+            </body>
+
+        </TestCase>
+
+        
+
+        <!-- 
+
+            This is to be able to link with Flex 2 SWCs. It should never be called.  Just verify the current behavior to 
+
+            keep an eye out for changes. 
+
+        -->
+
+        <TestCase frequency="all" testID="RTL_ResourceManager_Method_addResourceBundle_NoBundleName_NoContent" description="Call addResourceBundle() to add a ResourceBundle which has no bundle name, and no content." keywords="[Runtime Localization,ResourceManager,addResourceBundle]" >
+
+            <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="callAddResourceBundle(false, false)" />
+
+            </setup>
+
+            <body>
+
+                <AssertMethodValue method="ResourceManager.getInstance().getLocales()" valueExpression="value=null" />
+
+            </body>
+
+        </TestCase>
+
+
+
+        <!-- There is no use case to support these next two, but try them anyway. -->
+
+        <TestCase frequency="all" testID="RTL_ResourceManager_Method_addResourceBundle_NoBundleName_WithContent" description="Call addResourceBundle() to add a ResourceBundle which has no bundle name, but does have content." keywords="[Runtime Localization,ResourceManager,addResourceBundle]" >
+
+            <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="callAddResourceBundle(false, true)" />
+
+            </setup>
+
+            <body>
+
+                <AssertMethodValue method="ResourceManager.getInstance().getLocales()" valueExpression="value=null" />
+
+            </body>
+
+        </TestCase>
+
+
+
+        <TestCase frequency="all" testID="RTL_ResourceManager_Method_addResourceBundle_WithBundleName_NoContent" description="Call addResourceBundle() to add a ResourceBundle which has a name and content." keywords="[Runtime Localization,ResourceManager,addResourceBundle]" >
+
+            <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="callAddResourceBundle(true, false)" />
+
+            </setup>
+
+            <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().length" value="1" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().indexOf('fr_FR')" value="0" />                
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').length" value="1" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR')[0]" value="bundle1" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().localeChain.length" value="0" />
+
+            </body>
+
+        </TestCase>
+
+        
+
+    </testCases>
+
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_findResourceBundleWithResource.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_findResourceBundleWithResource.mxml?rev=1370380&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_findResourceBundleWithResource.mxml (added)
+++ incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_findResourceBundleWithResource.mxml Tue Aug  7 17:34:13 2012
@@ -0,0 +1,373 @@
+<?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="resources/ResourceManager/Methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="ResourceManagerApp.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.resources.ResourceManager;
+
+        import mx.resources.IResourceManager;
+
+        import mx.resources.ResourceBundle;
+
+        import mx.resources.IResourceBundle;
+
+    ]]></mx:Script>
+
+
+
+    <testCases>
+
+
+
+<!-- 
+
+    test cases:
+
+        - The locale chain is null.
+
+        - The locale chain has no elements (returns null, does no searching)
+
+
+
+        -
+
+
+
+        - Call when the first locale in the locale chain is not in the locale map (e.g. never call addResourceBundle() for it).  Should return first valid item's bundle. (or null if the only one)
+
+        - Call when the locale is in the locale chain, is valid, but does not have the specified bundle.  Should return the first item's bundle which has it. (or null if the only one)
+
+        - The locale is in the locale chain, has the bundle, but the resource is not there.  Should return the first item's bundle which has it. (or null if the only one)
+
+
+
+        - The locale is in the chain, has the bundle, and the resource is there.  Returns the bundle
+
+-->
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_LocaleChainNull" description="Call findResourceBundleWithResource() when the locale chain is null." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="ResourceManager.getInstance().localeChain = null" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'OPEN')" valueExpression="value=null" />
+
+    </body>
+
+</TestCase>
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_LocaleChainEmpty" description="Call findResourceBundleWithResource() when the locale chain is empty." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="ResourceManager.getInstance().localeChain = []" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'OPEN')" valueExpression="value=null" />
+
+    </body>
+
+</TestCase>
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_1LocaleChainItem_InvalidLocale" description="Call findResourceBundleWithResource() when the element in the locale chain in the locale map is not valid (e.g. does not appear in getLocales())." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="ResourceManager.getInstance().localeChain = ['fr_FR']" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'OPEN')" valueExpression="value=null" />
+
+    </body>
+
+</TestCase>
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_1LocaleChainItem_BundleMissing" description="Call findResourceBundleWithResource() when the element in the locale chain does not contain the bundle." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle2', 'OPEN')" valueExpression="value=null" />
+
+    </body>
+
+</TestCase>
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_1LocaleChainItem_ResourceMissing" description="Call findResourceBundleWithResource() when the element in the locale chain does not contain the resource." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'HOTDOG')" valueExpression="value=null" />
+
+    </body>
+
+</TestCase>
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_1LocaleChainItem_Works_ReturnType" description="Call findResourceBundleWithResource() when the element in the locale chain is valid, has the bundle, and has the resource." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+        <RunCode code="ResourceManager.getInstance().localeChain = ['fr_FR']" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'OPEN') is IResourceBundle" value="true" />
+
+    </body>
+
+</TestCase>
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_1LocaleChainItem_Works" description="Call findResourceBundleWithResource() when the element in the locale chain is valid, has the bundle, and has the resource." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+        <RunCode code="ResourceManager.getInstance().localeChain = ['fr_FR']" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'OPEN').bundleName" value="bundle1" />
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'OPEN').locale" value="fr_FR" />
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'OPEN').content['OPEN']" value="fr_FR_bundle1_Open" />                
+
+    </body>
+
+</TestCase>
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_3LocaleChainItems_InvalidLocale" description="Call findResourceBundleWithResource() when the first element in the locale chain in the locale map is not valid (e.g. does not appear in getLocales())." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="application.doAddResourceBundle('de_DE', 'bundle1')" />
+
+        <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle1')" />
+
+        <RunCode code="ResourceManager.getInstance().localeChain = ['fr_FR','de_DE','ja_JP']" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'OPEN').bundleName" value="bundle1" />
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'OPEN').locale" value="de_DE" />
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'OPEN').content['OPEN']" value="de_DE_bundle1_Open" />                
+
+    </body>
+
+</TestCase>
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_3LocaleChainItems_BundleMissing" description="Call findResourceBundleWithResource() when the first element in the locale chain does not contain the bundle." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+        <RunCode code="application.doAddResourceBundle('de_DE', 'bundle1')" />
+
+        <RunCode code="application.doAddResourceBundle('de_DE', 'bundle2')" />
+
+        <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle1')" />
+
+        <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle2')" />
+
+        <RunCode code="ResourceManager.getInstance().localeChain = ['fr_FR','de_DE','ja_JP']" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle2', 'OPEN').bundleName" value="bundle2" />
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle2', 'OPEN').locale" value="de_DE" />
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle2', 'OPEN').content['OPEN']" value="de_DE_bundle2_Open" />                
+
+    </body>
+
+</TestCase>
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_3LocaleChainItems_ResourceMissing" description="Call findResourceBundleWithResource() when the first element in the locale chain does not contain the resource." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1', false)" />
+
+        <RunCode code="application.doAddResourceBundle('de_DE', 'bundle1')" />
+
+        <RunCode code="application.doAddResourceBundle('de_DE', 'bundle2')" />
+
+        <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle1')" />
+
+        <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle2')" />
+
+        <RunCode code="ResourceManager.getInstance().localeChain = ['fr_FR','de_DE','ja_JP']" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'CLOSE').bundleName" value="bundle1" />
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'CLOSE').locale" value="de_DE" />
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle1', 'CLOSE').content['CLOSE']" value="de_DE_bundle1_Close" />                
+
+    </body>
+
+</TestCase>
+
+
+
+<TestCase frequency="all" testID="RTL_ResourceManager_Method_findResourceBundleWithResource_3LocaleChainItems_EverythingValid" description="Call findResourceBundleWithResource() when the first element in the locale chain is valid, has the bundle, and has the resource." keywords="[Runtime Localization,ResourceManager,findResourceBundleWithResource]" >
+
+    <setup>
+
+        <RunCode code="application.clearLocales()" />
+
+        <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+        <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle2')" />        
+
+        <RunCode code="application.doAddResourceBundle('de_DE', 'bundle1')" />
+
+        <RunCode code="application.doAddResourceBundle('de_DE', 'bundle2')" />
+
+        <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle1')" />
+
+        <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle2')" />
+
+        <RunCode code="ResourceManager.getInstance().localeChain = ['fr_FR','de_DE','ja_JP']" />
+
+    </setup>
+
+    <body>
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle2', 'OPEN').bundleName" value="bundle2" />
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle2', 'OPEN').locale" value="fr_FR" />
+
+        <AssertMethodValue method="value=ResourceManager.getInstance().findResourceBundleWithResource('bundle2', 'OPEN').content['OPEN']" value="fr_FR_bundle2_Open" />                
+
+    </body>
+
+</TestCase>
+
+
+
+    </testCases>
+
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getBoolean.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getBoolean.mxml?rev=1370380&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getBoolean.mxml (added)
+++ incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getBoolean.mxml Tue Aug  7 17:34:13 2012
@@ -0,0 +1,416 @@
+<?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="resources/ResourceManager/Methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="ResourceManagerApp.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.resources.IResourceManager;
+		import mx.resources.ResourceManager;
+		
+		private var resourceManager:IResourceManager = ResourceManager.getInstance();
+		
+		public function testGetBoolean(key:String, expectedValue:Boolean, locale:String = null):Boolean
+		{
+			return resourceManager.getBoolean('myResources', key, locale) === expectedValue;
+		}
+
+	]]></mx:Script>
+	
+	<testCases>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_NO_SUCH_KEY" description="Tests that the getBoolean() method of ResourceManager throws an Error when accessing a non-existent resource" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('NO_SUCH_KEY', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING" description="Tests the getBoolean() method of ResourceManager for a resource value which is a typical String" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_LIST" description="Tests the getBoolean() method of ResourceManager for a resource value which is a typical String of comma-separated items" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_LIST', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_EMPTY" description="Tests the getBoolean() method of ResourceManager for a resource value which is an empty String" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_EMPTY', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_NULL" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String 'null'" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_NULL', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_UNDEFINED" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String 'undefined'" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_UNDEFINED', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_TRUE_LOWERCASE" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String 'true'" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_TRUE_LOWERCASE', true)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_TRUE_MIXEDCASE" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String 'True'" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_TRUE_MIXEDCASE', true)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_TRUE_UPPERCASE" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String 'TRUE'" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_TRUE_UPPERCASE', true)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_FALSE_LOWERCASE" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String 'false'" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_FALSE_LOWERCASE', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_FALSE_MIXEDCASE" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String 'False'" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_FALSE_MIXEDCASE', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_FALSE_UPPERCASE" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String 'FALSE'" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_FALSE_UPPERCASE', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_NAN" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String 'NaN'" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_NAN', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_ZERO" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String '0'" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_ZERO', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_POSITIVE_INTEGER" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String rep of a typical positive integer" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_POSITIVE_INTEGER', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_NEGATIVE_INTEGER" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String rep of a typical negative integer" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_NEGATIVE_INTEGER', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_FIXEDPOINT" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String rep of a typical fractional Number" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_FIXEDPOINT', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_STRING_FLOATINGPOINT" description="Tests the getBoolean() method of ResourceManager for a resource value which is the String rep of a typical fractional Number in exponential notation" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('STRING_FLOATINGPOINT', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_NULL" description="Tests the getBoolean() method of ResourceManager for a resource value which is null" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('NULL', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_UNDEFINED" description="Tests the getBoolean() method of ResourceManager for a resource value which is undefined" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('UNDEFINED', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_TRUE" description="Tests the getBoolean() method of ResourceManager for a resource value which is true" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('TRUE', true)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_FALSE" description="Tests the getBoolean() method of ResourceManager for a resource value which is false" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('FALSE', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_NAN" description="Tests the getBoolean() method of ResourceManager for a resource value which is NaN" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('NAN', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_ZERO" description="Tests the getBoolean() method of ResourceManager for a resource value which is 0" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('ZERO', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_POSITIVE_INTEGER" description="Tests the getBoolean() method of ResourceManager for a resource value which is a typical positive integer" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('POSITIVE_INTEGER', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_NEGATIVE_INTEGER" description="Tests the getBoolean() method of ResourceManager for a resource value which is a typical negative integer" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('NEGATIVE_INTEGER', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_FIXEDPOINT" description="Tests the getBoolean() method of ResourceManager for a resource value which is a typical fractional Number" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('FIXEDPOINT', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_FLOATINGPOINT" description="Tests the getBoolean() method of ResourceManager for a resource value which is a typical fractional Number in exponential notation" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('FLOATINGPOINT', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_CLASS" description="Tests the getBoolean() method of ResourceManager for a resource value which is a Class reference" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('CLASS', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_ARRAY" description="Tests the getBoolean() method of ResourceManager for a resource value which is an Array of Strings" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('ARRAY', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_OBJECT" description="Tests the getBoolean() method of ResourceManager for a resource value which is a plain Object" keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetBoolean('OBJECT', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_localeParam_firstInLocaleChain_true" description="Tests the getBoolean() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+			    <RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetBoolean('TRUE', true, 'fr_FR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_localeParam_firstInLocaleChain_false" description="Tests the getBoolean() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+			    <RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetBoolean('FALSE', false, 'fr_FR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_localeParam_notFirstInLocaleChain_true" description="Tests the getBoolean() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetBoolean('TRUE', true, 'ja_JP')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_localeParam_notFirstInLocaleChain_false" description="Tests the getBoolean() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetBoolean('FALSE', false, 'ja_JP')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getBoolean_localeParam_localeMissing" description="Tests the getBoolean() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getBoolean]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetBoolean('TRUE', false, 'fu_BR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+	</testCases>
+</UnitTester>
+

Added: incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getBundleNamesForLocale.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getBundleNamesForLocale.mxml?rev=1370380&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getBundleNamesForLocale.mxml (added)
+++ incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getBundleNamesForLocale.mxml Tue Aug  7 17:34:13 2012
@@ -0,0 +1,231 @@
+<?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="resources/ResourceManager/Methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="ResourceManagerApp.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.resources.ResourceManager;
+
+        import mx.resources.IResourceManager;
+
+        import mx.resources.ResourceBundle;
+
+        import mx.resources.IResourceBundle;
+
+    ]]></mx:Script>
+
+
+
+    <testCases>
+
+
+
+        <TestCase frequency="all" testID="ResourceManager_getBundleNamesForLocale_ReturnType" description="Confirm that getBundleNamesForLocale() returns an Array." keywords="[Runtime Localization,ResourceManager,getBundleNamesForLocale]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+           </setup>
+
+           <body>
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR') is Array" value="true" />
+
+           </body>
+
+        </TestCase>
+
+
+
+        <TestCase frequency="all" testID="ResourceManager_getBundleNamesForLocale_1Locale_1Bundle" description="Call getBundleNamesForLocale() when there is 1 locale with 1 bundle." keywords="[Runtime Localization,ResourceManager,getBundleNamesForLocale]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+           </setup>
+
+           <body>
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').length" value="1" />
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR')[0]" value="bundle1" />
+
+           </body>
+
+        </TestCase>
+
+
+
+        <TestCase frequency="all" testID="ResourceManager_getBundleNamesForLocale_1Locale_3Bundles" description="Call getBundleNamesForLocale() when there is 1 locale with 3 bundles." keywords="[Runtime Localization,ResourceManager,getBundleNamesForLocale]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle2')" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle3')" />
+
+           </setup>
+
+           <body>
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').length" value="3" />
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').indexOf('bundle1') != -1" valueExpression="value=true" />
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').indexOf('bundle2') != -1" valueExpression="value=true" />
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').indexOf('bundle3') != -1" valueExpression="value=true" />
+
+           </body>
+
+        </TestCase>
+
+
+
+        <TestCase frequency="all" testID="ResourceManager_getBundleNamesForLocale_3Locales_VariousBundles" description="Call getBundleNamesForLocale() when there are 3 locales and 1, 2, or 3 bundles." keywords="[Runtime Localization,ResourceManager,getBundleNamesForLocale]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle1_jaJP')" />
+
+                <RunCode code="application.doAddResourceBundle('de_DE', 'bundle1_deDE')" />
+
+                <RunCode code="application.doAddResourceBundle('de_DE', 'bundle2_deDE')" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1_frFR')" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle2_frFR')" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle3_frFR')" />
+
+           </setup>
+
+           <body>
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('ja_JP').length" value="1" />
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('ja_JP')[0]" value="bundle1_jaJP" />
+
+               
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('de_DE').length" value="2" />
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('de_DE').indexOf('bundle1_deDE') != -1" valueExpression="value=true" />               
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('de_DE').indexOf('bundle2_deDE') != -1" valueExpression="value=true" />                              
+
+               
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').length" value="3" />
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').indexOf('bundle1_frFR') != -1" valueExpression="value=true" />
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').indexOf('bundle2_frFR') != -1" valueExpression="value=true" />
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').indexOf('bundle3_frFR') != -1" valueExpression="value=true" />                              
+
+           </body>
+
+        </TestCase>
+
+
+
+        <!-- This is not possible because it should not be possible to have a locale with no bundles. -->
+
+        <!--<TestCase frequency="all" testID="ResourceManager_getBundleNamesForLocale_1Locale_0Bundles" description="Call getBundleNamesForLocale() " keywords="[Runtime Localization,ResourceManager,getBundleNamesForLocale]" >-->
+
+
+
+        <TestCase frequency="all" testID="ResourceManager_getBundleNamesForLocale_NonexistantLocale" description="Call getBundleNamesForLocale() when there is a locale present, but we request a locale that does not exist." keywords="[Runtime Localization,ResourceManager,getBundleNamesForLocale]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+           </setup>
+
+           <body>
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('aa_BB').length" value="0" />
+
+           </body>
+
+        </TestCase>
+
+
+
+        <TestCase frequency="all" testID="ResourceManager_getBundleNamesForLocale_NoLocalesPresent" description="Call getBundleNamesForLocale() when there are no locales present." keywords="[Runtime Localization,ResourceManager,getBundleNamesForLocale]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+           </setup>
+
+           <body>
+
+               <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('fr_FR').length" value="0" />
+
+           </body>
+
+        </TestCase>
+
+
+
+    </testCases>
+
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getClass.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getClass.mxml?rev=1370380&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getClass.mxml (added)
+++ incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getClass.mxml Tue Aug  7 17:34:13 2012
@@ -0,0 +1,396 @@
+<?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="resources/ResourceManager/Methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="ResourceManagerApp.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.resources.IResourceManager;
+		import mx.resources.ResourceManager;
+		
+		private var resourceManager:IResourceManager = ResourceManager.getInstance();
+		
+		public function testGetClass(key:String, expectedValue:Class, locale:String = null):Boolean
+		{
+			return resourceManager.getClass('myResources', key, locale) === expectedValue;
+		}
+
+	]]></mx:Script>
+	
+	<testCases>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_NO_SUCH_KEY" description="Tests that the getClass() method of ResourceManager throws an Error when accessing a non-existent resource" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('NO_SUCH_KEY', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING" description="Tests the getClass() method of ResourceManager for a resource value which is a typical String" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_LIST" description="Tests the getClass() method of ResourceManager for a resource value which is a typical String of comma-separated items" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_LIST', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_EMPTY" description="Tests the getClass() method of ResourceManager for a resource value which is an empty String" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_EMPTY', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_NULL" description="Tests the getClass() method of ResourceManager for a resource value which is the String 'null'" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_NULL', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_UNDEFINED" description="Tests the getClass() method of ResourceManager for a resource value which is the String 'undefined'" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_UNDEFINED', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_TRUE_LOWERCASE" description="Tests the getClass() method of ResourceManager for a resource value which is the String 'true'" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_TRUE_LOWERCASE', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_TRUE_MIXEDCASE" description="Tests the getClass() method of ResourceManager for a resource value which is the String 'True'" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_TRUE_MIXEDCASE', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_TRUE_UPPERCASE" description="Tests the getClass() method of ResourceManager for a resource value which is the String 'TRUE'" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_TRUE_UPPERCASE', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_FALSE_LOWERCASE" description="Tests the getClass() method of ResourceManager for a resource value which is the String 'false'" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_FALSE_LOWERCASE', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_FALSE_MIXEDCASE" description="Tests the getClass() method of ResourceManager for a resource value which is the String 'False'" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_FALSE_MIXEDCASE', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_FALSE_UPPERCASE" description="Tests the getClass() method of ResourceManager for a resource value which is the String 'FALSE'" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_FALSE_UPPERCASE', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_NAN" description="Tests the getClass() method of ResourceManager for a resource value which is the String 'NaN'" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_NAN', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_ZERO" description="Tests the getClass() method of ResourceManager for a resource value which is the String '0'" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_ZERO', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_POSITIVE_INTEGER" description="Tests the getClass() method of ResourceManager for a resource value which is the String rep of a typical positive integer" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_POSITIVE_INTEGER', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_NEGATIVE_INTEGER" description="Tests the getClass() method of ResourceManager for a resource value which is the String rep of a typical negative integer" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_NEGATIVE_INTEGER', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_FIXEDPOINT" description="Tests the getClass() method of ResourceManager for a resource value which is the String rep of a typical fractional Number" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_FIXEDPOINT', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_STRING_FLOATINGPOINT" description="Tests the getClass() method of ResourceManager for a resource value which is the String rep of a typical fractional Number in exponential notation" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('STRING_FLOATINGPOINT', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_NULL" description="Tests the getClass() method of ResourceManager for a resource value which is null" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('NULL', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_UNDEFINED" description="Tests the getClass() method of ResourceManager for a resource value which is undefined" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('UNDEFINED', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_TRUE" description="Tests the getClass() method of ResourceManager for a resource value which is true" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('TRUE', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_FALSE" description="Tests the getClass() method of ResourceManager for a resource value which is false" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('FALSE', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_NAN" description="Tests the getClass() method of ResourceManager for a resource value which is NaN" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('NAN', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_ZERO" description="Tests the getClass() method of ResourceManager for a resource value which is 0" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('ZERO', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_POSITIVE_INTEGER" description="Tests the getClass() method of ResourceManager for a resource value which is a typical positive integer" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('POSITIVE_INTEGER', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_NEGATIVE_INTEGER" description="Tests the getClass() method of ResourceManager for a resource value which is a typical negative integer" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('NEGATIVE_INTEGER', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_FIXEDPOINT" description="Tests the getClass() method of ResourceManager for a resource value which is a typical fractional Number" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('FIXEDPOINT', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_FLOATINGPOINT" description="Tests the getClass() method of ResourceManager for a resource value which is a typical fractional Number in exponential notation" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('FLOATINGPOINT', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_CLASS" description="Tests the getClass() method of ResourceManager for a resource value which is a Class reference" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('CLASS', application.aClass)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_ARRAY" description="Tests the getClass() method of ResourceManager for a resource value which is an Array of Strings" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('ARRAY', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getClass_OBJECT" description="Tests the getClass() method of ResourceManager for a resource value which is a plain Object" keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetClass('OBJECT', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_localeParam_firstInLocaleChain_true" description="Tests the getClass() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+			    <RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetClass('CLASS', application.frClass, 'fr_FR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_localeParam_notFirstInLocaleChain_true" description="Tests the getClass() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetClass('CLASS', application.jaClass, 'ja_JP')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getClass_localeParam_localeMissing" description="Tests the getClass() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getClass]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetClass('CLASS', null, 'fu_BR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+	</testCases>
+
+</UnitTester>
+

Added: incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getInt.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getInt.mxml?rev=1370380&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getInt.mxml (added)
+++ incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getInt.mxml Tue Aug  7 17:34:13 2012
@@ -0,0 +1,396 @@
+<?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="resources/ResourceManager/Methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="ResourceManagerApp.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.resources.IResourceManager;
+		import mx.resources.ResourceManager;
+		
+		private var resourceManager:IResourceManager = ResourceManager.getInstance();
+		
+		public function testGetInt(key:String, expectedValue:int, locale:String = null):Boolean
+		{
+			return resourceManager.getInt('myResources', key, locale) === expectedValue;
+		}
+
+	]]></mx:Script>
+	
+	<testCases>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_NO_SUCH_KEY" description="Tests that the getInt() method of ResourceManager throws an Error when accessing a non-existent resource" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('NO_SUCH_KEY', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING" description="Tests the getInt() method of ResourceManager for a resource value which is a typical String" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_LIST" description="Tests the getInt() method of ResourceManager for a resource value which is a typical String of comma-separated items" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_LIST', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_EMPTY" description="Tests the getInt() method of ResourceManager for a resource value which is an empty String" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_EMPTY', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_NULL" description="Tests the getInt() method of ResourceManager for a resource value which is the String 'null'" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_NULL', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_UNDEFINED" description="Tests the getInt() method of ResourceManager for a resource value which is the String 'undefined'" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_UNDEFINED', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_TRUE_LOWERCASE" description="Tests the getInt() method of ResourceManager for a resource value which is the String 'true'" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_TRUE_LOWERCASE', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_TRUE_MIXEDCASE" description="Tests the getInt() method of ResourceManager for a resource value which is the String 'True'" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_TRUE_MIXEDCASE', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_TRUE_UPPERCASE" description="Tests the getInt() method of ResourceManager for a resource value which is the String 'TRUE'" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_TRUE_UPPERCASE', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_FALSE_LOWERCASE" description="Tests the getInt() method of ResourceManager for a resource value which is the String 'false'" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_FALSE_LOWERCASE', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_FALSE_MIXEDCASE" description="Tests the getInt() method of ResourceManager for a resource value which is the String 'False'" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_FALSE_MIXEDCASE', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_FALSE_UPPERCASE" description="Tests the getInt() method of ResourceManager for a resource value which is the String 'FALSE'" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_FALSE_UPPERCASE', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_NAN" description="Tests the getInt() method of ResourceManager for a resource value which is the String 'NaN'" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_NAN', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_ZERO" description="Tests the getInt() method of ResourceManager for a resource value which is the String '0'" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_ZERO', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_POSITIVE_INTEGER" description="Tests the getInt() method of ResourceManager for a resource value which is the String rep of a typical positive integer" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_POSITIVE_INTEGER', 3)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_NEGATIVE_INTEGER" description="Tests the getInt() method of ResourceManager for a resource value which is the String rep of a typical negative integer" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_NEGATIVE_INTEGER', -3)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_FIXEDPOINT" description="Tests the getInt() method of ResourceManager for a resource value which is the String rep of a typical fractional Number" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_FIXEDPOINT', 1)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_STRING_FLOATINGPOINT" description="Tests the getInt() method of ResourceManager for a resource value which is the String rep of a typical fractional Number in exponential notation" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('STRING_FLOATINGPOINT', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_NULL" description="Tests the getInt() method of ResourceManager for a resource value which is null" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('NULL', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_UNDEFINED" description="Tests the getInt() method of ResourceManager for a resource value which is undefined" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('UNDEFINED', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_TRUE" description="Tests the getInt() method of ResourceManager for a resource value which is true" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('TRUE', 1)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_FALSE" description="Tests the getInt() method of ResourceManager for a resource value which is false" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('FALSE', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_NAN" description="Tests the getInt() method of ResourceManager for a resource value which is NaN" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('NAN', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_ZERO" description="Tests the getInt() method of ResourceManager for a resource value which is 0" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('ZERO', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_POSITIVE_INTEGER" description="Tests the getInt() method of ResourceManager for a resource value which is a typical positive integer" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('POSITIVE_INTEGER', 3)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_NEGATIVE_INTEGER" description="Tests the getInt() method of ResourceManager for a resource value which is a typical negative integer" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('NEGATIVE_INTEGER', -3)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_FIXEDPOINT" description="Tests the getInt() method of ResourceManager for a resource value which is a typical fractional Number" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('FIXEDPOINT', 1)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_FLOATINGPOINT" description="Tests the getInt() method of ResourceManager for a resource value which is a typical fractional Number in exponential notation" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('FLOATINGPOINT', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_CLASS" description="Tests the getInt() method of ResourceManager for a resource value which is a Class reference" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('CLASS', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_ARRAY" description="Tests the getInt() method of ResourceManager for a resource value which is an Array of Strings" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('ARRAY', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getInt_OBJECT" description="Tests the getInt() method of ResourceManager for a resource value which is a plain Object" keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetInt('OBJECT', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_localeParam_firstInLocaleChain_true" description="Tests the getInt() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+			    <RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetInt('POSITIVE_INTEGER', 3, 'fr_FR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_localeParam_notFirstInLocaleChain_true" description="Tests the getInt() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetInt('POSITIVE_INTEGER', 2, 'ja_JP')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getInt_localeParam_localeMissing" description="Tests the getInt() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getInt]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetInt('POSITIVE_INTEGER', 0, 'fu_BR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+	</testCases>
+
+</UnitTester>
+



Mime
View raw message