public void ListEventTypes() { // List all the event types from Authorize.Net that you could subscribe to in a web hook var webHook = InitWebHook(); EventTypes eventTypes = null; try { eventTypes = webHook.ListEventTypes(); } catch (Exception err) { common.DisplayError(err); common.DisplayResponse(webHook); Assert.Fail("Exception from WebHook; Please see the output window for more information."); return; } if (eventTypes != null && eventTypes.Any()) { // see if we got any errors back from Authorize.Net that were not exceptions if (eventTypes.AnyError()) { foreach (var eventTypeEx in eventTypes.AllErrors()) { common.DisplayError(eventTypeEx.Exception); } } else { // no errors, we are good: Display the eventTypes and set the test as successful. common.DisplayItems(eventTypes); Assert.IsTrue(true); } } else { // We should have multiple event types Assert.Fail("Expecting multiple Event Types: Returned null/empty"); } common.DisplayResponse(webHook); }