Am also doing the same thing. My facade has the Command --> Proxy registered correctly. But while retrieving the proxy in the Test code, it's coming as null always. Any idea?
In Test case
==========
import com.blah.testapp.ApplicationFacade;
import com.blah.testapp.model.StockQuoteProxy;
var testAppProxy:TestAppProxy = TestApp.facade.retrieveProxy(TestAppProxy.NAME) as TestAppProxy;
App has the following
================
TestApp.mxml:
public static const NAME:String = 'TestApp';
public static var facade:ApplicationFacade = ApplicationFacade.getInstance(NAME);
private function onCreationComplete() : void
{
facade.startup(this);
}
Facade:
override protected function initializeController() : void {
super.initializeController();
registerCommand(Notification.TEST_APP_COMMAND, TestAppCommand);
}
Command:
var testAppProxy:TestAppProxy =
facade.retrieveProxy(TestAppProxy.NAME) as TestAppProxy;
if (testAppProxy == null) {
facade.registerProxy(testAppProxy = new TestAppProxy());
}