Beispiel #1
0
        public void When_get_Index_Then_should_call_the_correct_methods()
        {
            // Given
            var viewModel = new FireRiskAssessmentReviewsViewModel();
            _viewModelFactory
                .Setup(x => x.GetViewModel())
                .Returns(viewModel);

            // When
            target.Index(_companyId, _riskAssessmentId);
            
            // Then
            _viewModelFactory.VerifyAll();
        }
Beispiel #2
0
        [Test] public void When_get_Index_Then_should_returns_correct_viewmodel()
        {
            // Given
            var viewModel = new FireRiskAssessmentReviewsViewModel();
            _viewModelFactory
                .Setup(x => x.GetViewModel())
                .Returns(viewModel);

            // When
            var result = target.Index(_companyId, _riskAssessmentId) as ViewResult;
            var model = result.Model;

            // Then
            Assert.IsInstanceOf<FireRiskAssessmentReviewsViewModel>(model);
        }