I am hoping this is a straight forward question I ...
# testing
t
I am hoping this is a straight forward question I am trying to use getMockBox().querySim to mock a call to cfschedule I initially tried
Copy code
existingSchedules = getMockBox().querySim(......);
service.$("existingSchedules", existingSchedules);
in my service
existingSchedules
is a local function variable
schedule action="list" result="existingSchedules";
this doesn't appear to work if I refactor my code and wrap the cfschedule in a getter I can use
Copy code
service.$(method="getExistingSchedules", returns=existingSchedules);
and that works fine but I am not really keen on refactoring it that way am I missing something? the documentation implies that you can
This is a great way to simulate cfquery calls, cfdirectory or any other cf tag that returns a query.
but doesn't really explain how