title: partially touched code coverage area VS 2017
body: <p>I am doing testing and have to reach certain level of code coverage. I have a problem in the statment of event invocation, the code coverage is always showing partially touched case, therefore, affecting my overall coverage. </p>
  
  <p><strong>How can I make it to count as full coverage</strong></p>
  
  <p>I have seen some questions for the same but none has the exact answer to solve such small thing (or atleast small looking thing).</p>
  
  <p>The code is given below</p>
  
  <pre><code>public class ClassToBeTested
  {
      public event Action myEvent = delegate {};
  
      public void Function1 ()
      {
          myEvent?.invoke();  //partially touched
      }
  }
  
  
  public class  TestingClass
  {
      [Fact]
      public void TestingFunction1()
      {
          bool eventCheck = false;
          ClassToBeTested obj = new ClassToBeTested();
          obj.myEvent += delegate { eventCheck = true ;};
          obj.Function1();
          Assert.True(eventCheck);
      }
  }
  </code></pre>