コード例 #1
0
 protected override void Context()
 {
     _container = A.Fake <IContainer>();
     _timeProfileChartPresenter = A.Fake <ISimulationTimeProfileChartPresenter>();
     A.CallTo(() => _container.Resolve <ISimulationTimeProfileChartPresenter>()).Returns(_timeProfileChartPresenter);
     sut = new SimulationAnalysisPresenterFactory(_container);
 }
コード例 #2
0
        protected override void Context()
        {
            _view       = A.Fake <IEditIndividualSimulationView>();
            _repository = A.Fake <IRepository <ISimulationItemPresenter> >();
            _simulationAnalysisPresenterFactory = A.Fake <ISimulationAnalysisPresenterFactory>();
            _subPresenterManager       = A.Fake <ISubPresenterItemManager <IEditIndividualSimulationItemPresenter> >();
            _contextMenuFactory        = A.Fake <ISimulationAnalysisPresenterContextMenuFactory>();
            _presenterSettingsTask     = A.Fake <IPresentationSettingsTask>();
            _simulationAnalysisCreator = A.Fake <ISimulationAnalysisCreator>();
            _analysis       = A.Fake <ISimulationAnalysis>();
            _chartPresenter = A.Fake <ISimulationTimeProfileChartPresenter>();
            _simulation     = A.Fake <IndividualSimulation>();
            A.CallTo(() => _simulationAnalysisPresenterFactory.PresenterFor(_analysis)).Returns(_chartPresenter);
            A.CallTo(() => _simulation.Analyses).Returns(new List <ISimulationAnalysis> {
                _analysis
            });
            A.CallTo(() => _subPresenterManager.AllSubPresenters).Returns(new IEditIndividualSimulationItemPresenter[] {});

            sut = new EditIndividualSimulationPresenter(_view, _subPresenterManager, _simulationAnalysisPresenterFactory,
                                                        _contextMenuFactory, _presenterSettingsTask, _simulationAnalysisCreator);
        }
コード例 #3
0
 public void AttachPresenter(ISimulationTimeProfileChartPresenter presenter)
 {
     AttachPresenter(presenter.DowncastTo <IPKAnalysisWithChartPresenter>());
 }