Testing Proxies in PureMVC

This post is prompted by Larry Marburger’s article, since I came across this problem a few weeks ago, and found a different solution.

The scenario
There’s this great new framework that you’re starting to use, and it’s persuaded you to turn a new leaf and unit-test your work as you go. First off, be warned this is all AS2.0, using asunit2.5, because I’m still stuck in the dark ages :(

The problem
PureMVC uses Proxy objects to access data from the model, which fire off Notifications (PureMVC-specific events) when the data is ready. However, in the case of a Proxy that loads XML before making its data available, how do we know when it’s ready to be tested?

Read more »

PureMVC AS2.0 Unit Tests released

I’m really pleased to announce that the port of the PureMVC unit tests from AS3 to AS2 is complete, barring an update of the wiki.

You can get the details here, or export/checkout directly from the Subversion repository here.

This has pretty much been a simple port of the AS3 tests, but I’ve modified some of the mock objects required for the tests. Hopefully it all makes sense.

The AS2.0 tests make use of the AsUnit framework.

Unit testing Actionscript 2.0 with ASUnit

We’re going to have a shot at unit-testing actionscript 2.0, after we’ve decided what unit-testing is, and why’s it’s worth doing.

Read more »