title: Check if event in grid was triggered and if it sent the correct response (Azure) with C#
body: <p>I'm trying to test a function subscribed to an event grid. </p>
  
  <p>I found the following code that creates a custom event:</p>
  
  <pre><code>string topicEndpoint = "https://&lt;topic-name&gt;.&lt;region&gt;-1.eventgrid.azure.net/api/events";
  string topicKey = "&lt;topic-key&gt;";
  string topicHostname = new Uri(topicEndpoint).Host;
  
  TopicCredentials topicCredentials = new TopicCredentials(topicKey);
  EventGridClient client = new EventGridClient(topicCredentials);
  
  client.PublishEventsAsync(topicHostname, GetEventsList()).GetAwaiter().GetResult();
  Console.Write("Published events to Event Grid.");
  
  static IList&lt;EventGridEvent&gt; GetEventsList()
  {
      List&lt;EventGridEvent&gt; eventsList = new List&lt;EventGridEvent&gt;();
      for (int i = 0; i &lt; 1; i++)
      {
          eventsList.Add(new EventGridEvent()
          {
              Id = Guid.NewGuid().ToString(),
              EventType = "Contoso.Items.ItemReceivedEvent",
              Data = new ContosoItemReceivedEventData()
              {
                  ItemUri = "ContosoSuperItemUri"
              },
  
              EventTime = DateTime.Now,
              Subject = "Door1",
              DataVersion = "2.0"
          });
      }
      return eventsList;
  }
  </code></pre>
  
  <p>Now, how can I check if the function was actually triggered and if it is sending the sending response with C# code?</p>
  
  <p>Also, in the above code, is the <code>EventType</code> the name of the function to be triggered? Or how does the Event Grid knows which function to run?</p>