Пример #1
0
 public void Setup()
 {
     _riskAssessmentId = 100;
     _viewModelFactory = new Mock<IEditFireRiskAssessmentSummaryViewModelFactory>();
     _viewModelFactory
         .Setup(x => x.WithRiskAssessmentId(It.IsAny<long>()))
         .Returns(_viewModelFactory.Object);
     _viewModelFactory
         .Setup(x => x.WithCompanyId(It.IsAny<long>()))
         .Returns(_viewModelFactory.Object);
     _viewModelFactory
         .Setup(x => x.WithAllowableSiteIds(It.IsAny<IList<long>>()))
         .Returns(_viewModelFactory.Object);
     _viewModelFactory
         .Setup(x => x.GetViewModel())
         .Returns(new EditSummaryViewModel());
     
     target = GetTarget();
 }
Пример #2
0
 private SummaryController GetTarget()
 {
     var result = new SummaryController(_viewModelFactory.Object,_riskAssessmentService.Object);
     return TestControllerHelpers.AddUserToController(result);
 }
Пример #3
0
 private SummaryController GetTarget()
 {
     var result = new SummaryController(_viewModelFactory.Object, null);
     return TestControllerHelpers.AddUserToController(result);
 }