I am trying to use injectMethod to overwrite a call to entitySave to mock the database call, which doesn’t work.
Is there a more preferred or better way?
The other thing I tried to do was add a private method called entitySave()
in the component, that will never get called either. It won't error but it
won't call the method just call the builtin function.
-----Original Message-----
From: mxu...@googlegroups.com [mailto:mxu...@googlegroups.com] On Behalf Of
bill shelton
Sent: Sunday, 27 September 2009 9:56 PM
To: mxunit
You'd need to call variables.entitySave() to pick up the local method,
as I understand Adobe's implementation (which would never call the
built-in).
But you could, theoretically, have:
private function entitySave(item) {
entitySave(item);
}
and that would be the 'same' as your myLocalEntitySave() method but a
bit neater. Maybe.
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies US -- http://getrailo.com/
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood