title: Mocking EventHandler
body: <p>Having defined an interface</p>
  
  <pre><code> public interface IHandlerViewModel {
           EventHandler ClearInputText { get; } 
  }
  </code></pre>
  
  <p>I would like to test if ClearInputText is invoked by some method.
  To do so I do something like this</p>
  
  <pre><code>SomeType obj=new SomeType();
  bool clearCalled = false;
  var mockHandlerViewModel=new Mock&lt;IHandlerViewModel&gt;();
  mockHandlerViewModel.Setup(x =&gt; x.ClearInputText).Returns(delegate { clearCalled = true; });
  
  obj.Call(mockHandlerViewModel.Object);//void Call(IHandlerViewModel);
  Assert.IsTrue(clearCalled);
  </code></pre>
  
  <p>which fails. Simply the delegate is not called.
  Please help me with this.</p>