コード例 #1
0
        public async Task WhenGettingSelectOption_And_StandardHasOptions_Then_ReturnViewModel()
        {
            _mockModelMapper.Setup(m => m.Map <SelectOptionViewModel>(_request))
            .ReturnsAsync(_viewModel);

            var result = await _controller.SelectOption(_request) as ViewResult;

            result.ViewName.Should().BeNull();

            var model = result.Model as SelectOptionViewModel;

            model.Should().BeEquivalentTo(_viewModel);
        }