title: How to raise an event in a test that uses Moq?
body: <p>Here is part of code implementation in parent class:</p>
  
  <pre><code>handler.FooUpdateDelegate += FooUpdate(OnFooUpdate);
  protected abstract void OnFooUpdate(ref IBoo boo, string s);
  </code></pre>
  
  <p>I have in test method mocked handler:</p>
  
  <pre><code>Mock&lt;IHandler&gt; mHandler = mockFactory.Create&lt;IHandler&gt;();
  </code></pre>
  
  <p>This...</p>
  
  <pre><code>mHandler.Raise(x =&gt; x.FooUpdateDelegate += null, boo, s);
  </code></pre>
  
  <p>...is not working. It says: </p>
  
  <blockquote>
    <p>System.ArgumentException : Could not locate event for attach or detach method Void set_FooUpdateDelegate(FooUpdate).</p>
  </blockquote>
  
  <p>I want to raise <code>OnFooUpdate</code> so it triggers the code to be tested in child class.</p>
  
  <p><strong>Question:</strong> How can I raise delegate (not common event handler) with Moq?</p>
  
  <p>If I missed the point completely, please enligten me.</p>