Unit Testing an Event Firing From a Thread
- by Dougc
I'm having a problem unit testing a class which fires events when a thread starts and finishes. A cut down version of the offending source is as follows:
public class ThreadRunner
{
private bool keepRunning;
public event EventHandler Started;
public event EventHandler Finished;
public void StartThreadTest()
{
…