public void Test_EventGrid_ValidationResponse() { IList <CategoryEventData> eventList = NotificationTestsSetup.SetupValidationCodeData(); IActionResult result = _notificationService.HandleCategoryNotification(eventList); var okObjectResult = result as OkObjectResult; var response = okObjectResult.Value as EventValidationResponse; Assert.Equal("testValidationCode", response.ValidationResponse); }
public void Test_Text_TextUpdatedEvent() { IList <TextEventData> eventList = NotificationTestsSetup.SetupTextData(); // Setup connections for the same user foo Connections._connections.Add("foo", "conn1"); _mockClients.Setup(mock => mock.Client("conn1")).Returns(new TextUpdatedProxy()); IActionResult result = _notificationService.HandleTextNotification(eventList); }
public void Test_Category_SynonymsUpdatedEvent() { IList <CategoryEventData> eventList = NotificationTestsSetup.SetupCategorySynonymsData(); // Setup connections for the same user foo Connections._connections.Add("foo", "conn1"); _mockClients.Setup(mock => mock.Client("conn1")).Returns(new CategorySynonymsUpdatedProxy()); IActionResult result = _notificationService.HandleCategoryNotification(eventList); }