コード例 #1
0
        public void UpdateAsync_WhenModelIsValid_And_MatchingSurveyNotFound_ReturnsNotFound()
        {
            var response = _controller.UpdateAsync(_nonMatchingGuid, new App.Models.Survey
            {
                Name = _surveyName
            }).Result;

            _surveyService.Verify(repo => repo.UpdateExistingSurvey(_nonMatchingGuid, It.IsAny <App.Models.Survey>()), Times.Exactly(1));
            Assert.IsType <NotFoundResult>(response);
        }