コード例 #1
0
        public void SendWebHook_ExceptionThrown()
        {
            //Arrange
            var workItems = GetWorkItems();

            _handlerMock.Handler = null;

            _sender = new AuthorizedWebHookSender(_loggerMock.Object, _httpClient);

            //Act
            var actual = _sender.SendWebHookWorkItemsAsync(workItems);

            //Assert
            Assert.IsNotNull(actual);
        }
コード例 #2
0
        public void SendWebHook_ContentOfResponseIsNull()
        {
            //Arrange
            var workItems = GetWorkItems();

            _handlerMock.Handler = GetHttpNullContentRespone();

            _sender = new AuthorizedWebHookSender(_loggerMock.Object, _httpClient);

            //Act
            var actual = _sender.SendWebHookWorkItemsAsync(workItems);

            //Assert
            Assert.IsNotNull(actual);
        }