Daniel Harfleet

Delivering user-centric applications on the Adobe Flash Platform using Flex and AIR

Posts Tagged ‘actionscript

.doAction( ) – How to mock a function in AsMock that returns void

leave a comment »

Using AsMock to mock a result being returned from a function is quite common, however, how would you mock behavior on a function which returns void ?

Read the rest of this entry »

Advertisements

Written by dharfleet

July 17, 2012 at 12:26

Translating Force.com Rest API Date to ActionScript Date

leave a comment »

Recently I have been calling the Force.com Rest API from ActionsScript in an AIR project. When translating my entity objects, I found the need to translate the date as it is represented in the Rest API, into an ActionScript date instance and vice versa.

The Rest API uses ISO 8601 Format.

Here is the code:

Convert from Rest API to ActionScript:

 

Convert from ActionScript to the Rest API:

The full code can be found here

and its unit test

Written by dharfleet

June 12, 2012 at 13:54

ANT support for ActionScript code coverage tool

leave a comment »

In an earlier post I mentioned the ActionScript code coverage tool for FlashBuilder. Although it is incredibly valuable to run this tool in the IDE, those who use C.I. will be keen to see ANT support.

If you are keen to see ANT support, please vote here

Written by dharfleet

October 12, 2010 at 08:24