示例#1
0
        public async Task DeleteWishAsync_Returns_Unprocessable_When_An_Exception_Is_Thrown()
        {
            var req = TestHelper.CreateHttpRequest();

            _authService.Setup(s => s.IsAuthenticated(req)).ReturnsAsync(true);
            _table.SetupSegmentedQueryToThrow();

            var resp = await _function.DeleteWishAsync(req, _table.Object, _log.Object, "123");

            _log.VerifyLoggedException("Delete-Wish caused an exception");
            Assert.IsType <UnprocessableEntityObjectResult>(resp);
        }