Packageasunit.framework
Classpublic class AsynchronousTestCase
InheritanceAsynchronousTestCase Inheritance TestCase Inheritance Assert Inheritance flash.events.EventDispatcher
ImplementsTest
SubclassesAsynchronousTestCaseExample

Extend this class if you have a TestCase that requires the asynchronous load of external data.



Public Properties
 PropertyDefined by
  ioErrorExpected : Boolean
[write-only]
AsynchronousTestCase
  remoteDuration : int
[read-only]
AsynchronousTestCase
  remoteTimeout : int
[write-only]
AsynchronousTestCase
  securityErrorExpected : Boolean
[write-only]
AsynchronousTestCase
Protected Properties
 PropertyDefined by
 Inheritedcontext : DisplayObjectContainer
TestCase
 InheritedfName : String
TestCase
 InheritedisComplete : Boolean
TestCase
 Inheritedresult : TestListener
TestCase
 InheritedtestMethods : Array
TestCase
Public Methods
 MethodDefined by
  
AsynchronousTestCase(testMethod:String = null)
AsynchronousTestCase
 Inherited
assertEquals(... args):void
[static] Asserts that two objects are equal.
Assert
 Inherited
assertEqualsArrays(... args):void
[static] Asserts that two arrays have the same length and contain the same objects in the same order.
Assert
 Inherited
[static] Asserts that two arrays have the same length and contain the same objects.
Assert
 Inherited
assertEqualsFloat(... args):void
[static] Asserts that two numerical values are equal within a tolerance range.
Assert
 Inherited
assertFalse(... args):void
[static] Asserts that a condition is false.
Assert
 Inherited
assertNotNull(... args):void
[static] Asserts that an object isn't null.
Assert
 Inherited
assertNotSame(... args):void
[static] Asserts that two objects do not refer to the same object.
Assert
 Inherited
assertNull(... args):void
[static] Asserts that an object is null.
Assert
 Inherited
assertSame(... args):void
[static] Asserts that two objects refer to the same object.
Assert
 Inherited
assertThrows(errorType:Class, block:Function):void
[static] Asserts that the provided block throws an exception that matches the type provided.
Assert
 Inherited
assertTrue(... args):void
[static] Asserts that a condition is true.
Assert
 Inherited
TestCase
 Inherited
asyncOperationTimeout(async:AsyncOperation, duration:Number):void
TestCase
 Inherited
Counts the number of test cases executed by run(TestResult result).
TestCase
 Inherited
fail(message:String):void
[static] Fails a test with the given message.
Assert
 Inherited
getContext():DisplayObjectContainer
Returns the visual DisplayObjectContainer that will be used by addChild and removeChild helper methods.
TestCase
 Inherited
TestCase
 Inherited
getIsComplete():Boolean
TestCase
 Inherited
getName():String
Gets the name of a TestCase
TestCase
 Inherited
TestCase
 Inherited
TestCase
  
AsynchronousTestCase
  
run():void
AsynchronousTestCase
 Inherited
runBare():void
Runs the bare test sequence.
TestCase
 Inherited
setContext(context:DisplayObjectContainer):void
TestCase
 Inherited
setName(name:String):void
Sets the name of a TestCase
TestCase
 Inherited
setResult(result:TestListener):void
TestCase
  
AsynchronousTestCase
  
AsynchronousTestCase
 Inherited
toString():String
Returns a string representation of the test case
TestCase
Protected Methods
 MethodDefined by
 Inherited
addAsync(handler:Function = null, duration:Number):Function
Called from within setUp or the body of any test method.
TestCase
 Inherited
addChild(child:DisplayObject):DisplayObject
Helper method for testing DisplayObjects.
TestCase
 Inherited
cleanUp():void
Override this method in Asynchronous test cases or any other time you want to perform additional member cleanup after all test methods have run
TestCase
  
completeHandler(event:Event):void
AsynchronousTestCase
  
configureListeners(loader:URLLoader):void
AsynchronousTestCase
  
configureResponder(token:AsyncToken):void
AsynchronousTestCase
 Inherited
Creates a default TestResult object
TestCase
  
faultFunc(event:Object):void
AsynchronousTestCase
  
httpStatusHandler(event:HTTPStatusEvent):void
AsynchronousTestCase
  
ioErrorHandler(event:IOErrorEvent):void
AsynchronousTestCase
  
openHandler(event:Event):void
AsynchronousTestCase
  
progressHandler(event:ProgressEvent):void
AsynchronousTestCase
 Inherited
removeChild(child:DisplayObject):DisplayObject
Helper method for removing added DisplayObjects.
TestCase
  
resultFunc(event:Object):void
AsynchronousTestCase
 Inherited
runTearDown():void
TestCase
  
runTests():void
AsynchronousTestCase
  
securityErrorHandler(event:SecurityErrorEvent):void
AsynchronousTestCase
  
setDataSource(event:Event):void
AsynchronousTestCase
 Inherited
setTestMethods(methodNodes:XMLList):void
TestCase
 Inherited
setUp():void
Sets up the fixture, for example, instantiate a mock object.
TestCase
 Inherited
tearDown():void
Tears down the fixture, for example, delete mock object.
TestCase
Protected Constants
 ConstantDefined by
  DEFAULT_REMOTE_TIMEOUT : int = 30000
[static]
AsynchronousTestCase
 InheritedDEFAULT_TIMEOUT : int = 1000
[static]
TestCase
 InheritedPRE_SET_UP : int = 0
[static]
TestCase
 InheritedRUN_METHOD : int = 2
[static]
TestCase
 InheritedSET_UP : int = 1
[static]
TestCase
 InheritedTEAR_DOWN : int = 3
[static]
TestCase
Property detail
ioErrorExpectedproperty
ioErrorExpected:Boolean  [write-only]Implementation
    public function set ioErrorExpected(value:Boolean):void
remoteDurationproperty 
remoteDuration:int  [read-only]Implementation
    public function get remoteDuration():int
remoteTimeoutproperty 
remoteTimeout:int  [write-only]Implementation
    public function set remoteTimeout(value:int):void
securityErrorExpectedproperty 
securityErrorExpected:Boolean  [write-only]Implementation
    public function set securityErrorExpected(value:Boolean):void
Constructor detail
AsynchronousTestCase()constructor
public function AsynchronousTestCase(testMethod:String = null)Parameters
testMethod:String (default = null)
Method detail
completeHandler()method
protected final function completeHandler(event:Event):voidParameters
event:Event
configureListeners()method 
protected function configureListeners(loader:URLLoader):voidParameters
loader:URLLoader
configureResponder()method 
protected function configureResponder(token:AsyncToken):voidParameters
token:AsyncToken
faultFunc()method 
protected function faultFunc(event:Object):voidParameters
event:Object
httpStatusHandler()method 
protected function httpStatusHandler(event:HTTPStatusEvent):voidParameters
event:HTTPStatusEvent
ioErrorHandler()method 
protected final function ioErrorHandler(event:IOErrorEvent):voidParameters
event:IOErrorEvent
openHandler()method 
protected function openHandler(event:Event):voidParameters
event:Event
progressHandler()method 
protected function progressHandler(event:ProgressEvent):voidParameters
event:ProgressEvent
remoteDurationIsValid()method 
public function remoteDurationIsValid():Boolean

Returns
Boolean
resultFunc()method 
protected function resultFunc(event:Object):voidParameters
event:Object
run()method 
public override function run():void
runTests()method 
protected final function runTests():void
securityErrorHandler()method 
protected final function securityErrorHandler(event:SecurityErrorEvent):voidParameters
event:SecurityErrorEvent
setDataSource()method 
protected function setDataSource(event:Event):voidParameters
event:Event
testRemoteDuration()method 
public function testRemoteDuration():void
testUnauthorizedAccess()method 
public function testUnauthorizedAccess():void
Constant detail
DEFAULT_REMOTE_TIMEOUTconstant
protected static const DEFAULT_REMOTE_TIMEOUT:int = 30000