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 »

Unit-testing PureMVC

My current project is a timeline-based Actionscript 1.0 app, which is about as unmaintainable as it gets. When I started the backlog of change requests and updates was at least three months long, so making the site more easily updatable was a priority, in among doing the updates.

It’s a sprawling mass of code, with no division of responsibility anywhere, so bits of code spread out over the whole system are wired into each other, and it all feels like I’m left with wire-cutters and a bomb.

Enter PureMVC.

Read more »