protected override void Context()
        {
            _projectRetriever = A.Fake <IProjectRetriever>();
            _view             = A.Fake <IBuildingBlockExplorerView>();
            A.CallTo(() => _view.TreeView).Returns(A.Fake <IUxTreeView>());
            _context                            = A.Fake <IMoBiContext>();
            _regionResolver                     = A.Fake <IRegionResolver>();
            _treeNodeFactory                    = A.Fake <ITreeNodeFactory>();
            _viewItemContextMenuFactory         = A.Fake <IViewItemContextMenuFactory>();
            _classificationPresenter            = A.Fake <IClassificationPresenter>();
            _toolTipPartCreator                 = A.Fake <IToolTipPartCreator>();
            _observedDataInExplorerPresenter    = A.Fake <IObservedDataInExplorerPresenter>();
            _multipleTreeNodeContextMenuFactory = A.Fake <IMultipleTreeNodeContextMenuFactory>();
            _editBuildingBlockStarter           = A.Fake <IEditBuildingBlockStarter>();

            sut = new BuildingBlockExplorerPresenter(_view, _regionResolver, _treeNodeFactory, _viewItemContextMenuFactory, _context,
                                                     _classificationPresenter, _toolTipPartCreator, _observedDataInExplorerPresenter, _multipleTreeNodeContextMenuFactory, _projectRetriever, _editBuildingBlockStarter);

            _nodeSpatialStructureFolder     = setupNode(MoBiRootNodeTypes.SpatialStructureFolder);
            _nodeMoleculeFolder             = setupNode(MoBiRootNodeTypes.MoleculeFolder);
            _nodeReactionFolder             = setupNode(MoBiRootNodeTypes.ReactionFolder);
            _nodePassiveTransportFolder     = setupNode(MoBiRootNodeTypes.PassiveTransportFolder);
            _nodeObserverFolder             = setupNode(MoBiRootNodeTypes.ObserverFolder);
            _nodeEventFolder                = setupNode(MoBiRootNodeTypes.EventFolder);
            _nodeSimulationSettingsFolder   = setupNode(MoBiRootNodeTypes.SimulationSettingsFolder);
            _nodeMoleculeStartValuesFolder  = setupNode(MoBiRootNodeTypes.MoleculeStartValuesFolder);
            _nodeParameterStartValuesFolder = setupNode(MoBiRootNodeTypes.ParameterStartValuesFolder);
            _nodeObservedDataFolder         = setupNode(RootNodeTypes.ObservedDataFolder);
        }
 protected override void Context()
 {
     _buildingBlockRetriever = A.Fake <IBuildingBlockRetriever>();
     _observedDataRepository = A.Fake <IObservedDataRepository>();
     _toolTipPartCreator     = A.Fake <IToolTipPartCreator>();
     sut = new TreeNodeFactory(_buildingBlockRetriever, _observedDataRepository, _toolTipPartCreator);
 }
 public BuildingBlockExplorerPresenter(IBuildingBlockExplorerView view, IRegionResolver regionResolver, ITreeNodeFactory treeNodeFactory,
                                       IViewItemContextMenuFactory viewItemContextMenuFactory, IMoBiContext context, IClassificationPresenter classificationPresenter,
                                       IToolTipPartCreator toolTipPartCreator, IObservedDataInExplorerPresenter observedDataInExplorerPresenter,
                                       IMultipleTreeNodeContextMenuFactory multipleTreeNodeContextMenuFactory, IProjectRetriever projectRetriever, IEditBuildingBlockStarter editBuildingBlockStarter)
     : base(view, regionResolver, treeNodeFactory, viewItemContextMenuFactory, context, RegionNames.BuildingBlockExplorer,
            classificationPresenter, toolTipPartCreator, multipleTreeNodeContextMenuFactory, projectRetriever)
 {
     _observedDataInExplorerPresenter = observedDataInExplorerPresenter;
     _editBuildingBlockStarter        = editBuildingBlockStarter;
     _observedDataInExplorerPresenter.InitializeWith(this, classificationPresenter, RootNodeTypes.ObservedDataFolder);
 }
 public SimulationExplorerPresenter(ISimulationExplorerView view, IRegionResolver regionResolver, ITreeNodeFactory treeNodeFactory, IViewItemContextMenuFactory viewItemContextMenuFactory,
                                    IMoBiContext context, IClassificationPresenter classificationPresenter,
                                    IToolTipPartCreator toolTipPartCreator, IMultipleTreeNodeContextMenuFactory multipleTreeNodeContextMenuFactory,
                                    IProjectRetriever projectRetriever, IInteractionTasksForSimulation interactionTasksForSimulation, IParameterAnalysablesInExplorerPresenter parameterAnalysablesInExplorerPresenter) :
     base(view, regionResolver, treeNodeFactory, viewItemContextMenuFactory, context, RegionNames.SimulationExplorer,
          classificationPresenter, toolTipPartCreator, multipleTreeNodeContextMenuFactory, projectRetriever)
 {
     _interactionTasksForSimulation           = interactionTasksForSimulation;
     _parameterAnalysablesInExplorerPresenter = parameterAnalysablesInExplorerPresenter;
     _parameterAnalysablesInExplorerPresenter.InitializeWith(this, classificationPresenter);
 }
 public PopulationGroupNodeCreator(IParameterGroupNodeCreator parameterGroupNodeCreator, IParameterGroupTask parameterGroupTask,
                                   ITreeNodeFactory treeNodeFactory, IFullPathDisplayResolver fullPathDisplayResolver,
                                   IToolTipPartCreator toolTipPartCreator, IPathToPathElementsMapper pathElementsMapper)
 {
     _parameterGroupNodeCreator = parameterGroupNodeCreator;
     _parameterGroupTask        = parameterGroupTask;
     _treeNodeFactory           = treeNodeFactory;
     _fullPathDisplayResolver   = fullPathDisplayResolver;
     _toolTipPartCreator        = toolTipPartCreator;
     _pathElementsMapper        = pathElementsMapper;
 }
 public SimulationExplorerPresenter(ISimulationExplorerView view, ITreeNodeFactory treeNodeFactory, ITreeNodeContextMenuFactory treeNodeContextMenuFactory,
                                    IMultipleTreeNodeContextMenuFactory multipleTreeNodeContextMenuFactory, IBuildingBlockIconRetriever buildingBlockIconRetriever,
                                    IRegionResolver regionResolver, IBuildingBlockTask buildingBlockTask, IBuildingBlockInSimulationManager buildingBlockInSimulationManager,
                                    IToolTipPartCreator toolTipPartCreator, IProjectRetriever projectRetriever, IClassificationPresenter classificationPresenter, IParameterAnalysablesInExplorerPresenter parameterAnalysablesInExplorerPresenter, IObservedDataInSimulationManager observedDataInSimulationManager) :
     base(view, treeNodeFactory, treeNodeContextMenuFactory, multipleTreeNodeContextMenuFactory, buildingBlockIconRetriever, regionResolver, buildingBlockTask, RegionNames.SimulationExplorer, projectRetriever, classificationPresenter, toolTipPartCreator)
 {
     _buildingBlockInSimulationManager        = buildingBlockInSimulationManager;
     _parameterAnalysablesInExplorerPresenter = parameterAnalysablesInExplorerPresenter;
     _observedDataInSimulationManager         = observedDataInSimulationManager;
     _parameterAnalysablesInExplorerPresenter.InitializeWith(this, classificationPresenter);
 }
 protected AbstractExplorerPresenter(TView view, IRegionResolver regionResolver,
                                     IClassificationPresenter classificationPresenter, IToolTipPartCreator toolTipPartCreator, RegionName regionName, IProjectRetriever projectRetriever)
     : base(view)
 {
     _regionResolver          = regionResolver;
     _toolTipPartCreator      = toolTipPartCreator;
     _regionName              = regionName;
     _projectRetriever        = projectRetriever;
     _classificationPresenter = classificationPresenter;
     _classificationPresenter.InitializeWith(this);
 }
Exemple #8
0
        protected override void Context()
        {
            _toolTipPartCreator      = A.Fake <IToolTipPartCreator>();
            _buildingBlockRepository = A.Fake <IBuildingBlockRepository>();
            sut = new BuildingBlockSelectionDisplayer(_buildingBlockRepository, _toolTipPartCreator);

            _templateCompound    = new Compound().WithName("A").WithId("A");
            _nonTemplateCompound = new Compound().WithName("B").WithId("B");

            A.CallTo(() => _buildingBlockRepository.ById(_templateCompound.Id)).Returns(_templateCompound);
            A.CallTo(() => _buildingBlockRepository.ById(_nonTemplateCompound.Id)).Returns(null);
        }
 protected override void Context()
 {
     _projectRetriever                        = A.Fake <IProjectRetriever>();
     _view                                    = A.Fake <ISimulationExplorerView>();
     _regionResolver                          = A.Fake <IRegionResolver>();
     _treeNodeFactory                         = A.Fake <ITreeNodeFactory>();
     _viewItemContextMenuFactory              = A.Fake <IViewItemContextMenuFactory>();
     _context                                 = A.Fake <IMoBiContext>();
     _classificationPresenter                 = A.Fake <IClassificationPresenter>();
     _toolTipPartCreator                      = A.Fake <IToolTipPartCreator>();
     _multipleTreeNodeContextMenuFactory      = A.Fake <IMultipleTreeNodeContextMenuFactory>();
     _interactionTaskForSimulation            = A.Fake <IInteractionTasksForSimulation>();
     _parameterAnalysablesInExplorerPresenter = A.Fake <IParameterAnalysablesInExplorerPresenter>();
     sut = new SimulationExplorerPresenter(_view, _regionResolver, _treeNodeFactory, _viewItemContextMenuFactory, _context,
                                           _classificationPresenter, _toolTipPartCreator, _multipleTreeNodeContextMenuFactory, _projectRetriever, _interactionTaskForSimulation, _parameterAnalysablesInExplorerPresenter);
 }
Exemple #10
0
        protected override void Context()
        {
            _individualList = new List <Individual>();
            _individualBuildingBlockTask = A.Fake <IBuildingBlockTask <Individual> >();
            _container = A.Fake <IContainer>();
            A.CallTo(() => _container.Resolve <IBuildingBlockTask <Individual> >()).Returns(_individualBuildingBlockTask);
            _view = A.Fake <IBuildingBlockSelectionView>();
            _objectTypeResolver   = A.Fake <IObjectTypeResolver>();
            _individualRepository = A.Fake <IBuildingBlockRepository>();
            A.CallTo(() => _individualRepository.All <Individual>()).Returns(_individualList);
            _buildingBlockType = "Tralal";
            A.CallTo(() => _objectTypeResolver.TypeFor <Individual>()).Returns(_buildingBlockType);
            _toolTipCreator         = A.Fake <IToolTipPartCreator>();
            _buildingBlockSelection = A.Fake <IBuildingBlockSelectionDisplayer>();
            _objectBaseFactory      = A.Fake <IObjectBaseFactory>();
            _emptySelection         = new Individual().WithId("TOTO");
            A.CallTo(() => _objectBaseFactory.Create <Individual>()).Returns(_emptySelection);

            sut = new BuildingBlockSelectionPresenter <Individual>(_view, _objectTypeResolver, _individualRepository, _container, _objectBaseFactory, _buildingBlockSelection);
        }
Exemple #11
0
        protected override void Context()
        {
            _parameterGroupTask           = A.Fake <IParameterGroupTask>();
            _representationInfoRepository = A.Fake <IRepresentationInfoRepository>();
            _treeNodeCreator         = A.Fake <IParameterGroupNodeCreator>();
            _fullPathDisplayResolver = A.Fake <IFullPathDisplayResolver>();
            _toolTipPartCreator      = A.Fake <IToolTipPartCreator>();
            _treeNodeFactory         = new TreeNodeFactoryForSpecs();

            A.CallTo(() => _representationInfoRepository.InfoFor(A <IObjectBase> ._))
            .ReturnsLazily(x => new RepresentationInfo {
                DisplayName = x.GetArgument <IObjectBase>(0).Name
            });

            A.CallTo(() => _representationInfoRepository.DisplayNameFor(A <IObjectBase> ._))
            .ReturnsLazily(x => x.GetArgument <IObjectBase>(0).Name);

            _pathElementsMapper = new PKSimPathToPathElementsMapper(_representationInfoRepository, new EntityPathResolverForSpecs());

            sut = new PopulationGroupNodeCreator(_treeNodeCreator, _parameterGroupTask, _treeNodeFactory, _fullPathDisplayResolver, _toolTipPartCreator, _pathElementsMapper);

            _para1         = new PKSimParameter().WithId("P1").WithName("P1");
            _para2         = new PKSimParameter().WithId("P2").WithName("P2");
            _allParameters = new List <IParameter> {
                _para1, _para2
            };
            _rootGroup = new Group {
                Name = "group1"
            };
            _subGroup = new Group {
                Name = "subGroup"
            };
            _subGroupNode = new GroupNode(_subGroup);
            _rootNode     = new GroupNode(_rootGroup);
            _rootNode.AddChild(_subGroupNode);
            A.CallTo(() => _treeNodeCreator.MapForPopulationFrom(_rootGroup, _allParameters)).Returns(_rootNode);
            A.CallTo(() => _parameterGroupTask.ParametersIn(_subGroup, _allParameters)).Returns(_allParameters);
            A.CallTo(() => _parameterGroupTask.ParametersIn(_rootGroup, _allParameters)).Returns(new List <IParameter>());
            _liver  = new Container().WithName("Liver").WithId("Liver");
            _kidney = new Container().WithName("Kidney").WithId("Kidney");
        }
Exemple #12
0
 public ToolTipCreator(IRepresentationInfoRepository representationInfoRepository, IToolTipPartCreator toolTipPartCreator)
 {
     _representationInfoRepository = representationInfoRepository;
     _toolTipPartCreator           = toolTipPartCreator;
     _toolTipMapper = new ToolTipPartsToSuperToolTipMapper();
 }
 protected ExplorerPresenter(TView view, IRegionResolver regionResolver, ITreeNodeFactory treeNodeFactory, IViewItemContextMenuFactory viewItemContextMenuFactory, IMoBiContext context, RegionName regionName, IClassificationPresenter classificationPresenter, IToolTipPartCreator toolTipPartCreator, IMultipleTreeNodeContextMenuFactory multipleTreeNodeContextMenuFactory, IProjectRetriever projectRetriever)
     : base(view, regionResolver, classificationPresenter, toolTipPartCreator, regionName, projectRetriever)
 {
     _treeNodeFactory            = treeNodeFactory;
     _viewItemContextMenuFactory = viewItemContextMenuFactory;
     _context = context;
     _multipleTreeNodeContextMenuFactory = multipleTreeNodeContextMenuFactory;
 }
Exemple #14
0
 protected override void Context()
 {
     _toolTipPartCreator     = A.Fake <IToolTipPartCreator>();
     _observedDataRepository = A.Fake <IObservedDataRepository>();
     sut = new Nodes.TreeNodeFactory(_observedDataRepository, _toolTipPartCreator);
 }
        protected override void Context()
        {
            _buildingBlockIconRetriever = A.Fake <IBuildingBlockIconRetriever>();
            _view = A.Fake <ISimulationExplorerView>();
            A.CallTo(() => _view.TreeView).Returns(A.Fake <IUxTreeView>());
            _treeNodeFactory    = A.Fake <ITreeNodeFactory>();
            _contextMenuFactory = A.Fake <ITreeNodeContextMenuFactory>();
            _regionResolver     = A.Fake <IRegionResolver>();
            _buildingBlockInSimulationManager = A.Fake <IBuildingBlockInSimulationManager>();
            _buildingBlockTask  = A.Fake <IBuildingBlockTask>();
            _toolTipNodeCreator = A.Fake <IToolTipPartCreator>();
            _projectRetriever   = A.Fake <IProjectRetriever>();
            _multipleTreeNodeContextMenuFactory      = A.Fake <IMultipleTreeNodeContextMenuFactory>();
            _parameterAnalysablesInExplorerPresenter = A.Fake <IParameterAnalysablesInExplorerPresenter>();
            _simulationComparisonTask = A.Fake <ISimulationComparisonTask>();
            _simulationFolderNode     = new RootNode(RootNodeTypes.SimulationFolder);
            _comparisonFolderNode     = new RootNode(RootNodeTypes.ComparisonFolder);
            _project          = new PKSimProject();
            _usedObservedData = new UsedObservedData {
                Id = "UsedData"
            };
            _simulation           = new IndividualSimulation().WithName("individualSimulation").WithId("individualSimulation");
            _populationSimulation = new PopulationSimulation().WithName("populationSimulation").WithId("populationSimulation");
            _importedSimulaton    = A.Fake <Simulation>().WithName("ImportedSimulation").WithId("ImportedSimulation");
            A.CallTo(() => _importedSimulaton.IsImported).Returns(true);
            _simulation.Properties                   = new SimulationProperties();
            _simulation.ModelProperties              = new ModelProperties();
            _simulation.ModelConfiguration           = A.Fake <ModelConfiguration>();
            _populationSimulation.Properties         = new SimulationProperties();
            _populationSimulation.ModelProperties    = new ModelProperties();
            _populationSimulation.ModelConfiguration = A.Fake <ModelConfiguration>();
            _classificationPresenter                 = A.Fake <IClassificationPresenter>();
            _project.AddBuildingBlock(_simulation);
            _project.AddBuildingBlock(_populationSimulation);
            var classifiableIndividualSimulation = new ClassifiableSimulation {
                Subject = _simulation
            };
            var classfiablePopulationSimulation = new ClassifiableSimulation {
                Subject = _populationSimulation
            };
            var classifiableImportSimulation = new ClassifiableSimulation {
                Subject = _importedSimulaton
            };

            _project.AddClassifiable(classifiableIndividualSimulation);
            _project.AddClassifiable(classfiablePopulationSimulation);
            _individualSimulationNode = new SimulationNode(classifiableIndividualSimulation);
            _populationSimulationNode = new SimulationNode(classfiablePopulationSimulation);
            _importedSimulationNode   = new SimulationNode(classifiableImportSimulation);
            _usedObservedDataNode     = A.Fake <ITreeNode>();
            A.CallTo(() => _treeNodeFactory.CreateFor(classifiableIndividualSimulation)).Returns(_individualSimulationNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(classfiablePopulationSimulation)).Returns(_populationSimulationNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(classifiableImportSimulation)).Returns(_importedSimulationNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(_usedObservedData)).Returns(_usedObservedDataNode);
            _project.AddBuildingBlock(_importedSimulaton);

            var simulationComparison   = A.Fake <ISimulationComparison>().WithId("SimComp_Id");
            var classifiableComparison = new ClassifiableComparison {
                Subject = simulationComparison
            };

            _comparisonNode = new ComparisonNode(classifiableComparison);
            _project.AddSimulationComparison(simulationComparison);
            A.CallTo(() => _treeNodeFactory.CreateFor(classifiableComparison)).Returns(_comparisonNode);


            _usedCompoundBuildingBlock = new UsedBuildingBlock("toto", PKSimBuildingBlockType.Compound)
            {
                Id = "usedBB"
            };
            _simulation.AddUsedBuildingBlock(_usedCompoundBuildingBlock);
            _simulation.AddUsedObservedData(_usedObservedData);

            _project.AddClassifiable(classifiableComparison);

            _templageCompoundBuildingBlock = A.Fake <IPKSimBuildingBlock>();
            _usedBuildingBlockNode         = new UsedBuildingBlockInSimulationNode(_simulation, _usedCompoundBuildingBlock, _templageCompoundBuildingBlock);
            A.CallTo(() => _treeNodeFactory.CreateFor(_simulation, _usedCompoundBuildingBlock)).Returns(_usedBuildingBlockNode);
            A.CallTo(() => _buildingBlockIconRetriever.IconFor(_simulation)).Returns(ApplicationIcons.SimulationGreen);
            A.CallTo(() => _buildingBlockIconRetriever.IconFor(_populationSimulation)).Returns(ApplicationIcons.SimulationGreen);
            A.CallTo(() => _buildingBlockIconRetriever.IconFor(_usedCompoundBuildingBlock)).Returns(ApplicationIcons.CompoundRed);
            A.CallTo(() => _view.TreeView.NodeById(_simulation.Id)).Returns(_individualSimulationNode);
            A.CallTo(() => _view.TreeView.NodeById(_usedCompoundBuildingBlock.Id)).Returns(_usedBuildingBlockNode);
            A.CallTo(() => _view.TreeView.NodeById(RootNodeTypes.SimulationFolder.Id)).Returns(_simulationFolderNode);
            A.CallTo(() => _view.TreeView.NodeById(RootNodeTypes.ComparisonFolder.Id)).Returns(_comparisonFolderNode);

            _observedDataInSimulationManager = A.Fake <IObservedDataInSimulationManager>();
            sut = new SimulationExplorerPresenter(
                _view, _treeNodeFactory, _contextMenuFactory,
                _multipleTreeNodeContextMenuFactory, _buildingBlockIconRetriever,
                _regionResolver, _buildingBlockTask, _buildingBlockInSimulationManager,
                _toolTipNodeCreator, _projectRetriever, _classificationPresenter,
                _parameterAnalysablesInExplorerPresenter, _observedDataInSimulationManager, _simulationComparisonTask);

            A.CallTo(() => _projectRetriever.CurrentProject).Returns(_project);
        }
Exemple #16
0
        protected override void Context()
        {
            _view = A.Fake <IBuildingBlockExplorerView>();
            A.CallTo(() => _view.TreeView).Returns(A.Fake <IUxTreeView>());
            _regionResolver = A.Fake <IRegionResolver>();
            _region         = A.Fake <IRegion>();
            A.CallTo(() => _regionResolver.RegionWithName(RegionNames.BuildingBlockExplorer)).Returns(_region);
            _project = new PKSimProject();
            var compound = new Compound().WithName("compound");

            _individual            = new Individual().WithName("individual");
            _individual.OriginData = new OriginData {
                Species = new Species()
            };
            _project.AddBuildingBlock(_individual);
            _project.AddBuildingBlock(compound);
            _observedDataInExplorerPresenter = A.Fake <IObservedDataInExplorerPresenter>();
            _buildingBlockIconRetriever      = A.Fake <IBuildingBlockIconRetriever>();
            _treeNodeFactory                    = A.Fake <ITreeNodeFactory>();
            _contextMenuFactory                 = A.Fake <ITreeNodeContextMenuFactory>();
            _buildingBlockTask                  = A.Fake <IBuildingBlockTask>();
            _toolTipCreator                     = A.Fake <IToolTipPartCreator>();
            _projectRetriever                   = A.Fake <IProjectRetriever>();
            _classificationPresenter            = A.Fake <IClassificationPresenter>();
            _multipleTreeNodeContextMenuFactory = A.Fake <IMultipleTreeNodeContextMenuFactory>();
            sut = new BuildingBlockExplorerPresenter(_view, _treeNodeFactory, _contextMenuFactory, _multipleTreeNodeContextMenuFactory, _buildingBlockIconRetriever, _regionResolver,
                                                     _buildingBlockTask, _toolTipCreator, _projectRetriever, _classificationPresenter, _observedDataInExplorerPresenter);

            _compoundFolderNode    = new RootNode(PKSimRootNodeTypes.CompoundFolder);
            _individualFolderNode  = new RootNode(PKSimRootNodeTypes.IndividualFolder);
            _formulationFolderNode = new RootNode(PKSimRootNodeTypes.FormulationFolder);
            _protocolFolderNode    = new RootNode(PKSimRootNodeTypes.ProtocolFolder);
            _observersFolderNode   = new RootNode(PKSimRootNodeTypes.ObserverSetFolder);
            _populationFolderNode  = new RootNode(PKSimRootNodeTypes.PopulationFolder);
            _eventRootNode         = new RootNode(PKSimRootNodeTypes.EventFolder);
            _simulationNode        = new SimulationNode(new ClassifiableSimulation {
                Subject = new IndividualSimulation {
                    Id = "1"
                }
            });
            _compoundNode        = new ObjectWithIdAndNameNode <Compound>(compound);
            _individualNode      = new ObjectWithIdAndNameNode <Individual>(_individual);
            _observationRootNode = new RootNode(RootNodeTypes.ObservedDataFolder);
            A.CallTo(() => _treeNodeFactory.CreateFor(PKSimRootNodeTypes.CompoundFolder)).Returns(_compoundFolderNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(PKSimRootNodeTypes.IndividualFolder)).Returns(_individualFolderNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(PKSimRootNodeTypes.ProtocolFolder)).Returns(_protocolFolderNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(PKSimRootNodeTypes.ObserverSetFolder)).Returns(_observersFolderNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(PKSimRootNodeTypes.FormulationFolder)).Returns(_formulationFolderNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(PKSimRootNodeTypes.PopulationFolder)).Returns(_populationFolderNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(RootNodeTypes.ObservedDataFolder)).Returns(_observationRootNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(PKSimRootNodeTypes.EventFolder)).Returns(_eventRootNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(_individual)).Returns(_individualNode);
            A.CallTo(() => _treeNodeFactory.CreateFor(compound)).Returns(_compoundNode);

            A.CallTo(() => _view.TreeView.NodeById(PKSimRootNodeTypes.CompoundFolder.Id)).Returns(_compoundFolderNode);
            A.CallTo(() => _view.TreeView.NodeById(PKSimRootNodeTypes.IndividualFolder.Id)).Returns(_individualFolderNode);
            A.CallTo(() => _view.TreeView.NodeById(PKSimRootNodeTypes.ProtocolFolder.Id)).Returns(_protocolFolderNode);
            A.CallTo(() => _view.TreeView.NodeById(PKSimRootNodeTypes.ObserverSetFolder.Id)).Returns(_observersFolderNode);
            A.CallTo(() => _view.TreeView.NodeById(PKSimRootNodeTypes.FormulationFolder.Id)).Returns(_formulationFolderNode);
            A.CallTo(() => _view.TreeView.NodeById(PKSimRootNodeTypes.PopulationFolder.Id)).Returns(_populationFolderNode);
            A.CallTo(() => _view.TreeView.NodeById(RootNodeTypes.ObservedDataFolder.Id)).Returns(_observationRootNode);
            A.CallTo(() => _view.TreeView.NodeById(PKSimRootNodeTypes.EventFolder.Id)).Returns(_eventRootNode);

            A.CallTo(() => _view.AddNode(A <ITreeNode> ._)).ReturnsLazily(s => s.Arguments[0].DowncastTo <ITreeNode>());
        }
 public TreeNodeFactory(IObservedDataRepository observedDataRepository, IToolTipPartCreator toolTipPartCreator) : base(observedDataRepository, toolTipPartCreator)
 {
 }
Exemple #18
0
 protected ExplorerPresenter(TView view, ITreeNodeFactory treeNodeFactory, ITreeNodeContextMenuFactory treeNodeContextMenuFactory,
                             IMultipleTreeNodeContextMenuFactory multipleTreeNodeContextMenuFactory,
                             IBuildingBlockIconRetriever buildingBlockIconRetriever, IRegionResolver regionResolver, IBuildingBlockTask buildingBlockTask, RegionName regionName,
                             IProjectRetriever projectRetriever, IClassificationPresenter classificationPresenter, IToolTipPartCreator toolTipPartCreator) :
     base(view, regionResolver, classificationPresenter, toolTipPartCreator, regionName, projectRetriever)
 {
     _treeNodeFactory                    = treeNodeFactory;
     _treeNodeContextMenuFactory         = treeNodeContextMenuFactory;
     _multipleTreeNodeContextMenuFactory = multipleTreeNodeContextMenuFactory;
     _buildingBlockIconRetriever         = buildingBlockIconRetriever;
     _buildingBlockTask                  = buildingBlockTask;
 }
 public BuildingBlockSelectionDisplayer(IBuildingBlockRepository buildingBlockRepository, IToolTipPartCreator toolTipPartCreator)
 {
     _buildingBlockRepository = buildingBlockRepository;
     _toolTipPartCreator      = toolTipPartCreator;
 }
Exemple #20
0
 public BuildingBlockExplorerPresenter(IBuildingBlockExplorerView view, ITreeNodeFactory treeNodeFactory, ITreeNodeContextMenuFactory treeNodeContextMenuFactory, IMultipleTreeNodeContextMenuFactory multipleTreeNodeContextMenuFactory, IBuildingBlockIconRetriever buildingBlockIconRetriever,
                                       IRegionResolver regionResolver, IBuildingBlockTask buildingBlockTask, IToolTipPartCreator toolTipPartCreator, IProjectRetriever projectRetriever, IClassificationPresenter classificationPresenter, IObservedDataInExplorerPresenter observedDataInExplorerPresenter)
     : base(view, treeNodeFactory, treeNodeContextMenuFactory, multipleTreeNodeContextMenuFactory, buildingBlockIconRetriever, regionResolver, buildingBlockTask, RegionNames.BuildingBlockExplorer, projectRetriever, classificationPresenter, toolTipPartCreator)
 {
     _observedDataInExplorerPresenter = observedDataInExplorerPresenter;
     _observedDataInExplorerPresenter.InitializeWith(this, classificationPresenter, RootNodeTypes.ObservedDataFolder);
 }
Exemple #21
0
 public ExplorerForTestPresenter(IExplorerForTestView view, IRegionResolver regionResolver, IClassificationPresenter classificationPresenter, IToolTipPartCreator toolTipPartCreator, IProjectRetriever projectRetriever)
     : base(view, regionResolver, classificationPresenter, toolTipPartCreator, RegionNames.Explorer, projectRetriever)
 {
 }
Exemple #22
0
 public TreeNodeFactory(IBuildingBlockRetriever buildingBlockRetriever, IObservedDataRepository observedDataRepository, IToolTipPartCreator toolTipPartCreator) : base(observedDataRepository, toolTipPartCreator)
 {
     _buildingBlockRetriever = buildingBlockRetriever;
 }
Exemple #23
0
 public TreeNodeFactory(IObservedDataRepository observedDataRepository, IToolTipPartCreator toolTipPartCreator)
 {
     _observedDataRepository = observedDataRepository;
     _toolTipPartCreator     = toolTipPartCreator;
 }