public WhenSendingToProviderTestFixture() { var autoFixture = new Fixture(); _request = autoFixture.Create <SentRequest>(); _viewModel = autoFixture.Create <SentViewModel>(); var modelMapper = new Mock <IModelMapper>(); modelMapper.Setup(x => x.Map <SentViewModel>(It.Is <SentRequest>(r => r == _request))) .ReturnsAsync(_viewModel); _linkGeneratorResult = autoFixture.Create <string>(); var linkGenerator = new Mock <ILinkGenerator>(); linkGenerator.Setup(x => x.CommitmentsLink(It.IsAny <string>())) .Returns(_linkGeneratorResult); CohortController = new CohortController(Mock.Of <ICommitmentsApiClient>(), Mock.Of <ILogger <CohortController> >(), linkGenerator.Object, modelMapper.Object, Mock.Of <IAuthorizationService>(), Mock.Of <IEncodingService>()); }
public ReportBugModalViewModel( BugReport bugReport, SendingViewModel sendingViewModel, SentViewModel sentViewModel, FormViewModel formViewModel, FailureViewModel failureViewModel) { _bugReport = bugReport; _sendingViewModel = sendingViewModel; _sentViewModel = sentViewModel; FormViewModel = formViewModel; _failureViewModel = failureViewModel; SendReportCommand = new RelayCommand(SendReport, CanSend); BackCommand = new RelayCommand(Back); RetryCommand = new RelayCommand(Retry, CanSend); }
public ReportBugModalViewModel( Common.Configuration.Config appConfig, BugReport bugReport, SendingViewModel sendingViewModel, SentViewModel sentViewModel, FormViewModel formViewModel, FailureViewModel failureViewModel) { _appConfig = appConfig; _bugReport = bugReport; _sendingViewModel = sendingViewModel; _sentViewModel = sentViewModel; FormViewModel = formViewModel; _failureViewModel = failureViewModel; SendReportCommand = new RelayCommand(SendReport, CanSend); BackCommand = new RelayCommand(Back); RetryCommand = new RelayCommand(Retry, CanSend); CloseErrorCommand = new RelayCommand(CloseErrorAction); }