locked
Waiting for a timer callback to finish RRS feed

  • Question

  • Hi,

    I'm currently writing some test-methods for a class we've developed. The main part of this class is a timer-callback that does scanning, now I've mocked up an example of this class and I'm trying to write a test-method that starts the timer and waits until the callback function has been called once and finished. At the moment I do this by doing a loop ( while ( ClassMock.isAlive ) ... )  though this does not seem to be what I'd call the optimal method.

    How would you go about doing what I'm trying to do?
    Tuesday, February 9, 2010 9:57 AM

Answers

All replies