Friday, September 11, 2009

Mock samples for AS3

I have uploaded the mock samples for AS3 (FlexUnit and mock4as1.0) at the MockSampels project.

The samples are concise and illustrative examples of Mock Objects features, such as exceptions, consecutive calls, and time-based testing.

Bellow are some snapshots of the test code.

sample code from the BankSysteTest

accountFrom.expects("withdraw").withArg(20.0).willThrow(new InsufficientFundsException());
bank.transfer(accountFrom, accountTo, 20.0);
}catch (e:InsufficientFundsException){

sample code rom the TimedCacheTest

cache = new TimedCache(objectLoader, clock, reloadPolicy);
assertEquals(VALUE, cache.lookUp(KEY));


Aditya said...

I am trying to use selenium 1.0 with flex 3.0 on Firefox 3.x.

I placed the selenium.swc in lib folder & compiled one of my mxml. Final output(swf) is placed in web application, also included user-extension.js in IDE & started to walk through with selenium IDE in firefox 3.x. But the events are not recorded.

Can you please help me out & its great if you help me out with an sample applciation.... (

Thx alot.

Automation Testing Institute said...

Flash Selenium has been named a finalist in this year's ATI Automation Honors. For more information, visit

Author said...

Learn adobe flash,actionscript, as3, html5, flex tutorials

adobe flash,actionscript, as3, html5, flex said...

Read all the related Posts:

64 Software Manual Testing Interview Questions

Answers To Common Job Interview Questions

Behavioral Questions In Interviews

Questions to Ask at an Interview

Competency based Interview Questions

Read all the related Posts:

How to avoid missing defect in Software Testing?

Defect Management Process

What is the difference between a Test Strategy and Test Plan?

Beginners Guide to ETL Testing

Step by step guide from Test Case Development to Test Execution