I am trying to unit test a function which returns instantly and then returns the actual result by a callback function. Can anybody help me in how to unit test this function using cppunit.
for eg .
MyFunction(callback call) { .....
}
MyFunction returns success instantly and then the actual result in a callback function, from the callback an exception myexception is thrown how can I unit test to make sure that myexception is thrown?