protected override void Context()
        {
            _populationExportTask   = A.Fake <IPopulationExportTask>();
            _activeSubjectRetriever = A.Fake <IActiveSubjectRetriever>();
            _applicationController  = A.Fake <IApplicationController>();
            _selectFilePresenter    = A.Fake <ISelectFilePresenter>();
            A.CallTo(_applicationController).WithReturnType <ISelectFilePresenter>().Returns(_selectFilePresenter);

            A.CallTo(_selectFilePresenter).WithReturnType <FileSelection>().Returns(_fileSelection);

            sut = new ExportPopulationSimulationToCSVCommand(_populationExportTask, _applicationController, _activeSubjectRetriever);
        }
 protected override void Context()
 {
     _configuration               = A.Fake <IPKSimConfiguration>();
     _applicationController       = A.Fake <IApplicationController>();
     _workspace                   = A.Fake <IWorkspace>();
     _entityPathResolver          = A.Fake <IEntityPathResolver>();
     _selectFilePresenter         = A.Fake <ISelectFilePresenter>();
     _lazyLoadTask                = A.Fake <ILazyLoadTask>();
     _simModelExporter            = A.Fake <ISimModelExporter>();
     _modelCoreSimulationMapper   = A.Fake <ISimulationToModelCoreSimulationMapper>();
     _simulationSettingsRetriever = A.Fake <ISimulationSettingsRetriever>();
     _dialogCreator               = A.Fake <IDialogCreator>();
     _cloner     = A.Fake <ICloner>();
     _population = A.Fake <Population>().WithName("MyPop");
     A.CallTo(() => _population.AllCovariateNames).Returns(new[] { CoreConstants.Covariates.GENDER, CoreConstants.Covariates.RACE });
     A.CallTo(() => _applicationController.Start <ISelectFilePresenter>()).Returns(_selectFilePresenter);
     sut = new PopulationExportTask(_applicationController, _entityPathResolver, _lazyLoadTask, _simModelExporter,
                                    _modelCoreSimulationMapper, _workspace, _configuration, _simulationSettingsRetriever, _dialogCreator, _cloner);
 }
Exemple #3
0
 public void AttachPresenter(ISelectFilePresenter presenter)
 {
     _presenter = presenter;
 }