I've seen plenty of posts and documentation on testing asynchronous apex in general, but what about code with multiple layers of asynchronous code?
Specifically, I have a scheduled apex class which contains an @future method. When I test the @future method by itself, I get expected results. However, when I set up a test on the schedulable class itself (as demonstrated here), it appears to not perform the code contained in the @future method.
I know that we use Test.startTest()
and Test.stopTest()
in the test method to fire asynchronous code placed between them, but it seems that only causes the top-level asynchronous code to fire. Is there a way for me to cause all levels of asynch code to fire within a single test method?