Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }