title: How do I Unit Test an infinitely waiting listener?
body: <p>I am using MSTest, Vs2010. I have a situation where a method with a while loop calls <a href="http://msdn.microsoft.com/en-us/library/system.threading.autoresetevent.waitone%28v=vs.100%29.aspx" rel="noreferrer">AutoResetEvent.WaitOne</a>. I can trigger this event from my Test method; it will iterate one time and then again wait for this event to be triggered.</p>
  
  <p>I am unable to assert anything in this situation. How can I Unit Test these kind of methods?</p>
  
  <p>Thanks</p>