المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Unit Testing



C# Programming
04-23-2009, 07:31 PM
I have a number of test that each submit an object to a Queue (that is declared statically in my Unit test Class) The queue automatically processes each item until there is non left and then fires an event allProcessed.

The problem, is that for each unit test all i test is that it was added to the queue correctally, and i need to let the queue finish processing and at the moment it is getting cut off becasue all the tests finish before the queue processed.

Is there any way to make the test run wait until the allProcessed is fired?

Thanks