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 [6/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_getLocales.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getLocales.mxml?rev=1370380&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getLocales.mxml (added)
+++ incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getLocales.mxml Tue Aug  7 17:34:13 2012
@@ -0,0 +1,139 @@
+<?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;
+
+    ]]></mx:Script>
+
+
+
+    <testCases>
+
+    
+
+        <TestCase frequency="all" testID="RTL_ResourceManager_Method_getLocales_OneLocale" description="Call getLocales() with 1 locale." keywords="[Runtime Localization,ResourceManager,getLocales]" >
+
+            <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+            </setup>
+
+            <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().length" value="1" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().indexOf('fr_FR')" value="0" />
+
+                <Pause timeout="1" />
+
+            </body>
+
+        </TestCase>
+
+
+
+        <TestCase frequency="all" testID="RTL_ResourceManager_Method_getLocales_ThreeLocales" description="Call getLocales() with 3 locales." keywords="[Runtime Localization,ResourceManager,getLocales]" >
+
+            <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+                <RunCode code="application.doAddResourceBundle('en_US', 'bundle1')" />
+
+                <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle1')" />
+
+            </setup>
+
+            <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().length" value="3" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().indexOf('fr_FR') != -1" valueExpression="value=true" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().indexOf('en_US') != -1" valueExpression="value=true" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().indexOf('ja_JP') != -1" valueExpression="value=true" />                                
+
+                <Pause timeout="1" />
+
+            </body>
+
+        </TestCase>
+
+
+
+        <TestCase frequency="all" testID="RTL_ResourceManager_Method_getLocales_NoLocales" description="Call getLocales() with no locales." keywords="[Runtime Localization,ResourceManager,getLocales]" >
+
+            <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+            </setup>
+
+            <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().length" value="0" />
+
+                <Pause timeout="1" />
+
+            </body>
+
+        </TestCase>
+
+
+
+    </testCases>        
+
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getNumber.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getNumber.mxml?rev=1370380&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getNumber.mxml (added)
+++ incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getNumber.mxml Tue Aug  7 17:34:13 2012
@@ -0,0 +1,404 @@
+<?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 testGetNumber(key:String, expectedValue:Number, locale:String = null):Boolean
+		{
+			// Special-case logic for when the resource value is NaN,
+			// because you can't use === to check for NaN.
+			if (expectedValue is Number && isNaN(expectedValue))
+			{
+				var resourceValue:* = resourceManager.getNumber('myResources', key, locale);
+				return resourceValue is Number && isNaN(resourceValue);
+			}
+
+			return resourceManager.getNumber('myResources', key, locale) === expectedValue;
+		}
+
+	]]></mx:Script>
+	
+	<testCases>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_NO_SUCH_KEY" description="Tests that the getNumber() method of ResourceManager throws an Error when accessing a non-existent resource" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('NO_SUCH_KEY', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING" description="Tests the getNumber() method of ResourceManager for a resource value which is a typical String" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_LIST" description="Tests the getNumber() method of ResourceManager for a resource value which is a typical String of comma-separated items" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_LIST', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_EMPTY" description="Tests the getNumber() method of ResourceManager for a resource value which is an empty String" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_EMPTY', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_NULL" description="Tests the getNumber() method of ResourceManager for a resource value which is the String 'null'" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_NULL', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_UNDEFINED" description="Tests the getNumber() method of ResourceManager for a resource value which is the String 'undefined'" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_UNDEFINED', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_TRUE_LOWERCASE" description="Tests the getNumber() method of ResourceManager for a resource value which is the String 'true'" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_TRUE_LOWERCASE', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_TRUE_MIXEDCASE" description="Tests the getNumber() method of ResourceManager for a resource value which is the String 'True'" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_TRUE_MIXEDCASE', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_TRUE_UPPERCASE" description="Tests the getNumber() method of ResourceManager for a resource value which is the String 'TRUE'" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_TRUE_UPPERCASE', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_FALSE_LOWERCASE" description="Tests the getNumber() method of ResourceManager for a resource value which is the String 'false'" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_FALSE_LOWERCASE', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_FALSE_MIXEDCASE" description="Tests the getNumber() method of ResourceManager for a resource value which is the String 'False'" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_FALSE_MIXEDCASE', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_FALSE_UPPERCASE" description="Tests the getNumber() method of ResourceManager for a resource value which is the String 'FALSE'" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_FALSE_UPPERCASE', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_NAN" description="Tests the getNumber() method of ResourceManager for a resource value which is the String 'NaN'" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_NAN', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_ZERO" description="Tests the getNumber() method of ResourceManager for a resource value which is the String '0'" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_ZERO', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_POSITIVE_INTEGER" description="Tests the getNumber() method of ResourceManager for a resource value which is the String rep of a typical positive integer" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_POSITIVE_INTEGER', 3)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_NEGATIVE_INTEGER" description="Tests the getNumber() method of ResourceManager for a resource value which is the String rep of a typical negative integer" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_NEGATIVE_INTEGER', -3)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_FIXEDPOINT" description="Tests the getNumber() method of ResourceManager for a resource value which is the String rep of a typical fractional Number" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_FIXEDPOINT', 1.5)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_STRING_FLOATINGPOINT" description="Tests the getNumber() method of ResourceManager for a resource value which is the String rep of a typical fractional Number in exponential notation" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('STRING_FLOATINGPOINT', 5.0e-1)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_NULL" description="Tests the getNumber() method of ResourceManager for a resource value which is null" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('NULL', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_UNDEFINED" description="Tests the getNumber() method of ResourceManager for a resource value which is undefined" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('UNDEFINED', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_TRUE" description="Tests the getNumber() method of ResourceManager for a resource value which is true" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('TRUE', 1)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_FALSE" description="Tests the getNumber() method of ResourceManager for a resource value which is false" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('FALSE', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_NAN" description="Tests the getNumber() method of ResourceManager for a resource value which is NaN" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('NAN', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_ZERO" description="Tests the getNumber() method of ResourceManager for a resource value which is 0" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('ZERO', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_POSITIVE_INTEGER" description="Tests the getNumber() method of ResourceManager for a resource value which is a typical positive integer" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('POSITIVE_INTEGER', 3)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_NEGATIVE_INTEGER" description="Tests the getNumber() method of ResourceManager for a resource value which is a typical negative integer" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('NEGATIVE_INTEGER', -3)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_FIXEDPOINT" description="Tests the getNumber() method of ResourceManager for a resource value which is a typical fractional Number" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('FIXEDPOINT', 1.5)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_FLOATINGPOINT" description="Tests the getNumber() method of ResourceManager for a resource value which is a typical fractional Number in exponential notation" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('FLOATINGPOINT', 5.0e-1)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_CLASS" description="Tests the getNumber() method of ResourceManager for a resource value which is a Class reference" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('CLASS', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_ARRAY" description="Tests the getNumber() method of ResourceManager for a resource value which is an Array of Strings" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('ARRAY', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getNumber_OBJECT" description="Tests the getNumber() method of ResourceManager for a resource value which is a plain Object" keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetNumber('OBJECT', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_localeParam_firstInLocaleChain_true" description="Tests the getNumber() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+			    <RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetNumber('POSITIVE_INTEGER', 3, 'fr_FR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_localeParam_notFirstInLocaleChain_true" description="Tests the getNumber() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetNumber('POSITIVE_INTEGER', 2, 'ja_JP')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getNumber_localeParam_localeMissing" description="Tests the getNumber() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getNumber]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetNumber('POSITIVE_INTEGER', NaN, 'fu_BR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+	</testCases>
+
+</UnitTester>
+

Added: incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getObject.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getObject.mxml?rev=1370380&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getObject.mxml (added)
+++ incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getObject.mxml Tue Aug  7 17:34:13 2012
@@ -0,0 +1,404 @@
+<?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 testGetObject(key:String, expectedValue:*, locale:String = null):Boolean
+		{
+			// Special-case logic for when the resource value is NaN,
+			// because you can't use === to check for NaN.
+			if (expectedValue is Number && isNaN(expectedValue))
+			{
+				var resourceValue:* = resourceManager.getObject('myResources', key, locale);
+				return resourceValue is Number && isNaN(resourceValue);
+			}
+
+			return resourceManager.getObject('myResources', key, locale) === expectedValue;
+		}
+
+	]]></mx:Script>
+	
+	<testCases>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_NO_SUCH_KEY" description="Tests that the getObject() method of ResourceManager throws an Error when accessing a non-existent resource" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('NO_SUCH_KEY', undefined)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING" description="Tests the getObject() method of ResourceManager for a resource value which is a typical String" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING', 'abc')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_LIST" description="Tests the getObject() method of ResourceManager for a resource value which is a typical String of comma-separated items" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_LIST', ' abc,def , ghi jil\tmno ')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_EMPTY" description="Tests the getObject() method of ResourceManager for a resource value which is an empty String" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_EMPTY', '')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_NULL" description="Tests the getObject() method of ResourceManager for a resource value which is the String 'null'" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_NULL', 'null')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_UNDEFINED" description="Tests the getObject() method of ResourceManager for a resource value which is the String 'undefined'" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_UNDEFINED', 'undefined')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_TRUE_LOWERCASE" description="Tests the getObject() method of ResourceManager for a resource value which is the String 'true'" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_TRUE_LOWERCASE', 'true')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_TRUE_MIXEDCASE" description="Tests the getObject() method of ResourceManager for a resource value which is the String 'True'" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_TRUE_MIXEDCASE', 'True')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_TRUE_UPPERCASE" description="Tests the getObject() method of ResourceManager for a resource value which is the String 'TRUE'" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_TRUE_UPPERCASE', 'TRUE')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_FALSE_LOWERCASE" description="Tests the getObject() method of ResourceManager for a resource value which is the String 'false'" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_FALSE_LOWERCASE', 'false')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_FALSE_MIXEDCASE" description="Tests the getObject() method of ResourceManager for a resource value which is the String 'False'" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_FALSE_MIXEDCASE', 'False')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_FALSE_UPPERCASE" description="Tests the getObject() method of ResourceManager for a resource value which is the String 'FALSE'" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_FALSE_UPPERCASE', 'FALSE')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_NAN" description="Tests the getObject() method of ResourceManager for a resource value which is the String 'NaN'" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_NAN', 'NaN')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_ZERO" description="Tests the getObject() method of ResourceManager for a resource value which is the String '0'" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_ZERO', '0')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_POSITIVE_INTEGER" description="Tests the getObject() method of ResourceManager for a resource value which is the String rep of a typical positive integer" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_POSITIVE_INTEGER', '3')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_NEGATIVE_INTEGER" description="Tests the getObject() method of ResourceManager for a resource value which is the String rep of a typical negative integer" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_NEGATIVE_INTEGER', '-3')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_FIXEDPOINT" description="Tests the getObject() method of ResourceManager for a resource value which is the String rep of a typical fractional Number" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_FIXEDPOINT', '1.5')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_STRING_FLOATINGPOINT" description="Tests the getObject() method of ResourceManager for a resource value which is the String rep of a typical fractional Number in exponential notation" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('STRING_FLOATINGPOINT', '5.0e-1')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_NULL" description="Tests the getObject() method of ResourceManager for a resource value which is null" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('NULL', null)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_UNDEFINED" description="Tests the getObject() method of ResourceManager for a resource value which is undefined" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('UNDEFINED', undefined)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_TRUE" description="Tests the getObject() method of ResourceManager for a resource value which is true" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('TRUE', true)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_FALSE" description="Tests the getObject() method of ResourceManager for a resource value which is false" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('FALSE', false)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_NAN" description="Tests the getObject() method of ResourceManager for a resource value which is NaN" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('NAN', NaN)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_ZERO" description="Tests the getObject() method of ResourceManager for a resource value which is 0" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('ZERO', 0)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_POSITIVE_INTEGER" description="Tests the getObject() method of ResourceManager for a resource value which is a typical positive integer" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('POSITIVE_INTEGER', 3)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_NEGATIVE_INTEGER" description="Tests the getObject() method of ResourceManager for a resource value which is a typical negative integer" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('NEGATIVE_INTEGER', -3)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_FIXEDPOINT" description="Tests the getObject() method of ResourceManager for a resource value which is a typical fractional Number" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('FIXEDPOINT', 1.5)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_FLOATINGPOINT" description="Tests the getObject() method of ResourceManager for a resource value which is a typical fractional Number in exponential notation" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('FLOATINGPOINT', 5.0e-1)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_CLASS" description="Tests the getObject() method of ResourceManager for a resource value which is a Class reference" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('CLASS', application.aClass)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_ARRAY" description="Tests the getObject() method of ResourceManager for a resource value which is an Array of Strings" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('ARRAY', application.anArray)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_OBJECT" description="Tests the getObject() method of ResourceManager for a resource value which is a plain Object" keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<AssertMethodValue method="value=testGetObject('OBJECT', application.anObject)" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+		<TestCase frequency="all" testID="ResourceManager_getObject_localeParam_firstInLocaleChain_true" description="Tests the getObject() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+			    <RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetObject('OBJECT', application.frObject, 'fr_FR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_localeParam_notFirstInLocaleChain_true" description="Tests the getObject() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetObject('OBJECT', application.jaObject, 'ja_JP')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+
+		<TestCase frequency="all" testID="ResourceManager_getObject_localeParam_localeMissing" description="Tests the getObject() method of ResourceManager for the ability to specify the locale." keywords="[resources,ResourceManager,getObject]">
+			<setup>
+				<RunCode code="application.setup()"/>
+			</setup>
+			<body>
+				<RunCode code="ResourceManager.getInstance().localeChain=['fr_FR','ja_JP']" />
+				<AssertMethodValue method="value=testGetObject('OBJECT', undefined, 'fu_BR')" value="true"/>
+				<Pause timeout="1"/>
+			</body>
+		</TestCase>
+		
+	</testCases>
+
+</UnitTester>
+

Added: incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getResourceBundle.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getResourceBundle.mxml?rev=1370380&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getResourceBundle.mxml (added)
+++ incubator/flex/trunk/mustella/tests/resources/ResourceManager/Methods/ResourceManager_Methods_getResourceBundle.mxml Tue Aug  7 17:34:13 2012
@@ -0,0 +1,291 @@
+<?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_getResourceBundle_ReturnType" description="Confirm that getResourceBundle() returns a ResourceBundle." keywords="[Runtime Localization,ResourceManager,getResourceBundle]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+           </setup>
+
+           <body>
+
+               <AssertMethodValue method="value=(ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle1')) is IResourceBundle" value="true" />
+
+           </body>
+
+        </TestCase>
+
+        
+
+        <TestCase frequency="all" testID="ResourceManager_getResourceBundle_1Locale1Bundle" description="Call getResourceBundle() when there is 1 locale and 1 bundle." keywords="[Runtime Localization,ResourceManager,getResourceBundle]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+           </setup>
+
+           <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle1').bundleName" value="bundle1" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle1').locale" value="fr_FR" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle1').content['OPEN']" value="fr_FR_bundle1_Open" />       
+
+           </body>
+
+        </TestCase>
+
+        
+
+        <TestCase frequency="all" testID="ResourceManager_getResourceBundle_3Locales3Bundles" description="Call getResourceBundle() when there are 3 locales and 3 bundles." keywords="[Runtime Localization,ResourceManager,getResourceBundle]" >
+
+           <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')" />
+
+                <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle1')" />
+
+                <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle2')" />
+
+                <RunCode code="application.doAddResourceBundle('ja_JP', 'bundle3')" />
+
+                <RunCode code="application.doAddResourceBundle('de_DE', 'bundle1')" />
+
+                <RunCode code="application.doAddResourceBundle('de_DE', 'bundle2')" />
+
+                <RunCode code="application.doAddResourceBundle('de_DE', 'bundle3')" />
+
+           </setup>
+
+           <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle1').bundleName" value="bundle1" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle1').locale" value="fr_FR" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle1').content['OPEN']" value="fr_FR_bundle1_Open" />       
+
+        
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle2').bundleName" value="bundle2" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle2').locale" value="fr_FR" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle2').content['OPEN']" value="fr_FR_bundle2_Open" />       
+
+        
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle3').bundleName" value="bundle3" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle3').locale" value="fr_FR" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle3').content['OPEN']" value="fr_FR_bundle3_Open" />       
+
+        
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('ja_JP', 'bundle1').bundleName" value="bundle1" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('ja_JP', 'bundle1').locale" value="ja_JP" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('ja_JP', 'bundle1').content['OPEN']" value="ja_JP_bundle1_Open" />       
+
+        
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('ja_JP', 'bundle2').bundleName" value="bundle2" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('ja_JP', 'bundle2').locale" value="ja_JP" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('ja_JP', 'bundle2').content['OPEN']" value="ja_JP_bundle2_Open" />       
+
+        
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('ja_JP', 'bundle3').bundleName" value="bundle3" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('ja_JP', 'bundle3').locale" value="ja_JP" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('ja_JP', 'bundle3').content['OPEN']" value="ja_JP_bundle3_Open" />       
+
+        
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('de_DE', 'bundle1').bundleName" value="bundle1" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('de_DE', 'bundle1').locale" value="de_DE" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('de_DE', 'bundle1').content['OPEN']" value="de_DE_bundle1_Open" />       
+
+        
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('de_DE', 'bundle2').bundleName" value="bundle2" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('de_DE', 'bundle2').locale" value="de_DE" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('de_DE', 'bundle2').content['OPEN']" value="de_DE_bundle2_Open" />       
+
+        
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('de_DE', 'bundle3').bundleName" value="bundle3" />
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('de_DE', 'bundle3').locale" value="de_DE" /> 
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('de_DE', 'bundle3').content['OPEN']" value="de_DE_bundle3_Open" />       
+
+           </body>
+
+        </TestCase>
+
+        
+
+        <TestCase frequency="all" testID="ResourceManager_getResourceBundle_NonexistantLocale" description="Call getResourceBundle() passing in a nonexistant locale parameter." keywords="[Runtime Localization,ResourceManager,getResourceBundle]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+           </setup>
+
+           <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('aa_BB', 'bundle1')" valueExpression="value=null" />
+
+           </body>
+
+        </TestCase>
+
+        
+
+        <TestCase frequency="all" testID="ResourceManager_getResourceBundle_NonexistantBundle" description="Call getResourceBundle() passing in a nonexistant bundle parameter." keywords="[Runtime Localization,ResourceManager,getResourceBundle]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+           </setup>
+
+           <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle2')" valueExpression="value=null" />
+
+           </body>
+
+        </TestCase>
+
+        
+
+        <TestCase frequency="all" testID="ResourceManager_getResourceBundle_NonexistantBoth" description="Call getResourceBundle() passing in nonexistant locale and bundle parameters." keywords="[Runtime Localization,ResourceManager,getResourceBundle]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+                <RunCode code="application.doAddResourceBundle('fr_FR', 'bundle1')" />
+
+           </setup>
+
+           <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('aa_BB', 'bundle2')" valueExpression="value=null" />   
+
+           </body>
+
+        </TestCase>
+
+        
+
+        <TestCase frequency="all" testID="ResourceManager_getResourceBundle_NoBundlesPresent" description="Call getResourceBundle() when there are no bundles." keywords="[Runtime Localization,ResourceManager,getResourceBundle]" >
+
+           <setup>
+
+                <RunCode code="application.clearLocales()" />
+
+           </setup>
+
+           <body>
+
+                <AssertMethodValue method="value=ResourceManager.getInstance().getResourceBundle('fr_FR', 'bundle1')" valueExpression="value=null" />   
+
+           </body>
+
+        </TestCase>
+
+
+
+    </testCases>
+
+</UnitTester>



Mime
View raw message