protected override void ClearReferences()
 {
     _simulation  = null;
     _formulaTask = null;
     _affectedBuildingBlockRetriever = null;
     _buildingBlockFromSimulation    = null;
 }
Example #2
0
        protected override void Context()
        {
            _view                            = A.Fake <IEditTableFormulaWithXArgumentFormulaView>();
            _mapper                          = A.Fake <ITableFormulaWithXArgumentToTableFormulaWithXArgumentDTOMapper>();
            _formulaTask                     = A.Fake <IMoBiFormulaTask>();
            _displayUnitRetriever            = A.Fake <IDisplayUnitRetriever>();
            _applicationController           = A.Fake <IApplicationController>();
            _selectReferencePresenterFactory = A.Fake <ISelectReferencePresenterFactory>();
            _commandCollector                = A.Fake <ICommandCollector>();
            sut = new EditTableFormulaWithXArgumentFormulaPresenter(_view, _mapper, _formulaTask, _displayUnitRetriever, _applicationController, _selectReferencePresenterFactory);

            _tableFormulaWithXArgument = new TableFormulaWithXArgument();
            _parameter = new Parameter().WithName("Parameter");
            _container = new Container().WithName("Parent");
            _container.Add(_parameter);
            _referencePresenter = A.Fake <ISelectReferenceAtParameterPresenter>();
            _selectFormulaUsablePathPresenter = A.Fake <ISelectFormulaUsablePathPresenter>();
            _buildingBlock = A.Fake <IBuildingBlock>();

            A.CallTo(() => _selectReferencePresenterFactory.ReferenceAtParameterFor(_container)).Returns(_referencePresenter);
            A.CallTo(() => _applicationController.Start <ISelectFormulaUsablePathPresenter>()).Returns(_selectFormulaUsablePathPresenter);

            sut.BuildingBlock = _buildingBlock;
            sut.InitializeWith(_commandCollector);
        }
        protected override void Context()
        {
            _simulation                = new MoBiSimulation();
            _buildingBlock             = new MoleculeBuildingBlock();
            _formulaParameter          = new Parameter().WithFormula(new ExplicitFormula()).WithName("formula");
            _formulaParameter.Value    = 9;
            _constantParameter         = new Parameter().WithFormula(new ConstantFormula(1.0)).WithName("constant");
            _unaffectedParameter       = new Parameter().WithFormula(new ConstantFormula(1.0)).WithName("unaffected");
            _unaffectedParameter.Value = 5.0;
            _constantParameter.Value   = 9;
            _simulation.Model          = new Model {
                Root = new Container {
                    _formulaParameter, _constantParameter, _unaffectedParameter
                }
            };
            _context = A.Fake <IMoBiContext>();

            sut = new ResetFixedConstantParametersToDefaultInSimulationCommand <MoleculeBuildingBlock>(_simulation, _buildingBlock);

            _affectedBuildingBlockRetriever = A.Fake <IAffectedBuildingBlockRetriever>();
            _formulaTask = A.Fake <IMoBiFormulaTask>();

            A.CallTo(() => _formulaTask.CreateNewFormula <ConstantFormula>(A <IDimension> ._)).Returns(new ConstantFormula());

            A.CallTo(() => _context.Resolve <IAffectedBuildingBlockRetriever>()).Returns(_affectedBuildingBlockRetriever);
            A.CallTo(() => _context.Resolve <IMoBiFormulaTask>()).Returns(_formulaTask);
            var buildingBlockInfo = new MoleculesInfo {
                BuildingBlock = _buildingBlock
            };

            A.CallTo(() => _affectedBuildingBlockRetriever.RetrieveFor(_constantParameter, _simulation)).Returns(buildingBlockInfo);
            A.CallTo(() => _affectedBuildingBlockRetriever.RetrieveFor(_formulaParameter, _simulation)).Returns(buildingBlockInfo);
        }
Example #4
0
        protected override void Context()
        {
            _view                            = A.Fake <IEditTableFormulaWithOffsetFormulaView>();
            _mapper                          = A.Fake <ITableFormulaWithOffsetToTableFormulaWithOffsetDTOMapper>();
            _context                         = A.Fake <IMoBiContext>();
            _mobiFormulaTask                 = A.Fake <IMoBiFormulaTask>();
            _displayUnitRetriever            = A.Fake <IDisplayUnitRetriever>();
            _applicationController           = A.Fake <IApplicationController>();
            _selectReferencePresenterFactory = A.Fake <ISelectReferencePresenterFactory>();
            _timeDimension                   = DomainHelperForSpecs.TimeDimension;
            A.CallTo(() => _context.DimensionFactory.Dimension(Constants.Dimension.TIME)).Returns(_timeDimension);

            sut = new EditTableFormulaWithOffsetFormulaPresenter(_view, _mapper, _context, _mobiFormulaTask, _displayUnitRetriever, _applicationController, _selectReferencePresenterFactory);

            _commandCollector = A.Fake <ICommandCollector>();
            _buildingBlock    = A.Fake <IBuildingBlock>();

            sut.InitializeWith(_commandCollector);
            sut.BuildingBlock = _buildingBlock;
            _formula          = new TableFormulaWithOffset();
            _usingFormula     = new Parameter();
            _dto = new TableFormulaWithOffsetDTO();

            _selectFormulaUsablePathPresenter = A.Fake <ISelectFormulaUsablePathPresenter>();
            A.CallTo(() => _applicationController.Start <ISelectFormulaUsablePathPresenter>()).Returns(_selectFormulaUsablePathPresenter);

            _selectReferenceAtParameterPresenter = A.Fake <ISelectReferenceAtParameterPresenter>();
            A.CallTo(_selectReferencePresenterFactory).WithReturnType <ISelectReferenceAtParameterPresenter>().Returns(_selectReferenceAtParameterPresenter);

            A.CallTo(() => _selectFormulaUsablePathPresenter.Init(A <Func <IObjectBase, bool> > ._, _usingFormula, A <IEnumerable <IObjectBase> > ._, A <string> ._, _selectReferenceAtParameterPresenter))
            .Invokes(x => _predicate = x.GetArgument <Func <IObjectBase, bool> >(0));
        }
 protected override void ClearReferences()
 {
     _simulation               = null;
     _cloneManagerForModel     = null;
     _formulaTask              = null;
     _entityPathResolver       = null;
     _startValuesBuildingBlock = null;
 }
Example #6
0
 public InteractionTasksForMoleculeBuilder(IInteractionTaskContext interactionTaskContext, IEditTaskFor <IMoleculeBuilder> editTask,
                                           IReactionDimensionRetriever dimensionRetriever, IParameterFactory parameterFactory, ICoreCalculationMethodRepository calculationMethodRepository, IMoBiFormulaTask formulaTask)
     : base(interactionTaskContext, editTask)
 {
     _dimensionRetriever          = dimensionRetriever;
     _parameterFactory            = parameterFactory;
     _calculationMethodRepository = calculationMethodRepository;
     _formulaTask = formulaTask;
 }
 protected override void Context()
 {
     _context          = A.Fake <IInteractionTaskContext>();
     _editTasks        = A.Fake <IEditTaskFor <IParameter> >();
     _dimensionFactory = A.Fake <IMoBiDimensionFactory>();
     _formulaTask      = A.Fake <IMoBiFormulaTask>();
     _quantityTask     = A.Fake <IQuantityTask>();
     sut = new InteractionTasksForParameter(_context, _editTasks, _dimensionFactory, _formulaTask, _quantityTask);
 }
Example #8
0
 public EditSumFormulaPresenter(IEditSumFormulaView view, ISumFormulaToDTOSumFormulaMapper sumFormulaToDTOSumFormulaMapper, IDescriptorConditionListPresenter <SumFormula> descriptorConditionListPresenter,
                                IMoBiFormulaTask moBiFormulaTask, IDisplayUnitRetriever displayUnitRetriever)
     : base(view, displayUnitRetriever)
 {
     _sumFormulaToDTOSumFormulaMapper  = sumFormulaToDTOSumFormulaMapper;
     _descriptorConditionListPresenter = descriptorConditionListPresenter;
     _view.AddDescriptorConditionListView(_descriptorConditionListPresenter.View);
     AddSubPresenters(_descriptorConditionListPresenter);
     _moBiFormulaTask = moBiFormulaTask;
 }
 public EditTableFormulaPresenter(IEditTableFormulaView view, ITableFormulaToDTOTableFormulaMapper tableFormulaToDTOTableFormulaMapper, IMoBiContext context, ITableFormulaTask tableFormulaTask,
    IMoBiApplicationController applicationController, IMoBiFormulaTask moBiFormulaTask, IDisplayUnitRetriever displayUnitRetriever)
    : base(view, displayUnitRetriever)
 {
    _tableFormulaToDTOTableFormulaMapper = tableFormulaToDTOTableFormulaMapper;
    _context = context;
    _tableFormulaTask = tableFormulaTask;
    _applicationController = applicationController;
    _moBiFormulaTask = moBiFormulaTask;
 }
        protected override void ExecuteWith(IMoBiContext context)
        {
            _formulaTask = context.Resolve <IMoBiFormulaTask>();
            _affectedBuildingBlockRetriever = context.Resolve <IAffectedBuildingBlockRetriever>();

            var fixedParameters = fixedConstantParametersFromBuildingBlock();

            resetFixedParametersInSimulation(fixedParameters);

            context.PublishEvent(new ParameterChangedEvent(fixedParameters));
        }
        protected override void ExecuteWith(IMoBiContext context)
        {
            _entityPathResolver   = context.Resolve <IEntityPathResolver>();
            _cloneManagerForModel = context.Resolve <ICloneManagerForModel>();
            _formulaTask          = context.Resolve <IMoBiFormulaTask>();

            foreach (var quantity in AllQuantitiesToReset())
            {
                resetQuantity(quantity, QuantityUsedToFindPathFor(quantity), context);
            }
        }
Example #12
0
 public InteractionTasksForParameter(
     IInteractionTaskContext interactionTaskContext,
     IEditTaskFor <IParameter> editTasks,
     IMoBiDimensionFactory dimensionFactory,
     IMoBiFormulaTask formulaTask,
     IQuantityTask quantityTask) :
     base(interactionTaskContext, editTasks)
 {
     _dimensionFactory = dimensionFactory;
     _formulaTask      = formulaTask;
     _quantityTask     = quantityTask;
 }
 protected override void Context()
 {
     _editFormulaView          = A.Fake <IEditFormulaView>();
     _context                  = A.Fake <IMoBiContext>();
     _formulaPresenterCache    = A.Fake <IFormulaPresenterCache>();
     _formulaToDTOInfoMapper   = new FormulaToFormulaInfoDTOMapper();
     _formulaTask              = A.Fake <IMoBiFormulaTask>();
     _circularReferenceChecker = A.Fake <ICircularReferenceChecker>();
     sut = new EditFormulaPresenter(_editFormulaView, _formulaPresenterCache, _context, _formulaToDTOInfoMapper, new FormulaTypeCaptionRepository(), _formulaTask, _circularReferenceChecker);
     _commandCollector = A.Fake <ICommandCollector>();
     sut.InitializeWith(_commandCollector);
 }
 public InteractionTasksForObserverBuildingBlock(
     IInteractionTaskContext interactionTaskContext,
     IEditTasksForBuildingBlock <IObserverBuildingBlock> editTask,
     IInteractionTasksForBuilder <IObserverBuilder> builderTask,
     IMoleculeListTasks moleculeListTasks,
     IObserverBuildingBlockMergeManager mergeIgnoreReplaceMergeManager,
     IFormulaTask formulaTask,
     IMoBiFormulaTask moBiFormulaTask)
     : base(interactionTaskContext, editTask, builderTask, mergeIgnoreReplaceMergeManager, formulaTask, moleculeListTasks)
 {
     _formulaTask     = formulaTask;
     _moBiFormulaTask = moBiFormulaTask;
 }
        protected override void Context()
        {
            _view                       = A.Fake <IEditFormulaPathListView>();
            _moBiFormulaTask            = A.Fake <IMoBiFormulaTask>();
            _context                    = A.Fake <IMoBiContext>();
            _dimensionFactory           = A.Fake <IDimensionFactory>();
            _userSettings               = A.Fake <IUserSettings>();
            _contextMenuFactory         = A.Fake <IViewItemContextMenuFactory>();
            _circularReferenceChecker   = A.Fake <ICircularReferenceChecker>();
            _formulaUsablePathDTOMapper = A.Fake <IFormulaUsablePathToFormulaUsablePathDTOMapper>();

            sut = new EditFormulaPathListPresenter(_view, _moBiFormulaTask, _context, _dimensionFactory, _userSettings, _contextMenuFactory, _circularReferenceChecker, _formulaUsablePathDTOMapper);
        }
Example #16
0
 public EditTableFormulaWithXArgumentFormulaPresenter(
     IEditTableFormulaWithXArgumentFormulaView view,
     ITableFormulaWithXArgumentToTableFormulaWithXArgumentDTOMapper mapper,
     IMoBiFormulaTask moBiFormulaTask,
     IDisplayUnitRetriever displayUnitRetriever,
     IApplicationController applicationController,
     ISelectReferencePresenterFactory selectReferencePresenterFactory) : base(view, displayUnitRetriever)
 {
     _mapper                          = mapper;
     _moBiFormulaTask                 = moBiFormulaTask;
     _applicationController           = applicationController;
     _selectReferencePresenterFactory = selectReferencePresenterFactory;
 }
Example #17
0
 protected AbstractStartValuesTask(IInteractionTaskContext interactionTaskContext, IEditTasksForBuildingBlock <TBuildingBlock> editTask,
                                   IIgnoreReplaceMergeManager <TStartValue> startValueBuildingBlockMergeManager, ICloneManagerForBuildingBlock cloneManagerForBuildingBlock,
                                   IMoBiFormulaTask moBiFormulaTask, ISpatialStructureFactory spatialStructureFactory, IMapper <ImportedQuantityDTO, TStartValue> dtoToQuantityToParameterStartValueMapper,
                                   IStartValuePathTask <TBuildingBlock, TStartValue> startValuePathTask)
     : base(interactionTaskContext, editTask)
 {
     _startValueBuildingBlockMergeManager = startValueBuildingBlockMergeManager;
     _cloneManagerForBuildingBlock        = cloneManagerForBuildingBlock;
     _moBiFormulaTask         = moBiFormulaTask;
     _spatialStructureFactory = spatialStructureFactory;
     _dtoToQuantityToParameterStartValueMapper = dtoToQuantityToParameterStartValueMapper;
     _startValuePathTask = startValuePathTask;
 }
        protected override void Context()
        {
            _view = A.Fake <IEditTableFormulaView>();
            _tableFormulaToDTOTableFormulaMapper = A.Fake <ITableFormulaToDTOTableFormulaMapper>();
            _context               = A.Fake <IMoBiContext>();
            _tableFormulaTask      = A.Fake <ITableFormulaTask>();
            _applicationController = A.Fake <IMoBiApplicationController>();
            _moBiFormulaTask       = A.Fake <IMoBiFormulaTask>();
            _displayUnitRetriever  = A.Fake <IDisplayUnitRetriever>();

            sut = new EditTableFormulaPresenter(_view, _tableFormulaToDTOTableFormulaMapper, _context, _tableFormulaTask, _applicationController, _moBiFormulaTask, _displayUnitRetriever);
            _commandCollector = A.Fake <ICommandCollector>();
            sut.InitializeWith(_commandCollector);
        }
Example #19
0
 public EditFormulaPresenter(IEditFormulaView view, IFormulaPresenterCache formulaPresenterCache, IMoBiContext context,
                             IFormulaToFormulaInfoDTOMapper formulaDTOMapper, FormulaTypeCaptionRepository formulaTypeCaptionRepository,
                             IMoBiFormulaTask formulaTask, ICircularReferenceChecker circularReferenceChecker) : base(view)
 {
     _formulaDTOMapper             = formulaDTOMapper;
     _formulaTypeCaptionRepository = formulaTypeCaptionRepository;
     _formulaTask = formulaTask;
     _circularReferenceChecker = circularReferenceChecker;
     _context = context;
     _formulaPresenterCache = formulaPresenterCache;
     _allFormulaType        = new HashSet <Type> {
         typeof(ConstantFormula), typeof(TableFormula), typeof(ExplicitFormula), typeof(TableFormulaWithOffset), typeof(TableFormulaWithXArgument), typeof(SumFormula)
     };
     _defaultFormulaType = _allFormulaType.First();
 }
 public EditExplicitFormulaPresenter(IEditExplicitFormulaView view, IExplicitFormulaToExplicitFormulaDTOMapper explicitFormulaMapper, IActiveSubjectRetriever activeSubjectRetriever,
                                     IMoBiContext context, ICircularReferenceChecker circularReferenceChecker,
                                     IMoBiFormulaTask moBiFormulaTask, IReactionDimensionRetriever reactionDimensionRetriever, IDisplayUnitRetriever displayUnitRetriever,
                                     IViewItemContextMenuFactory contextMenuFactory, IUserSettings userSettings, IDimensionFactory dimensionFactory) : base(view, displayUnitRetriever)
 {
     _explicitFormulaMapper      = explicitFormulaMapper;
     _circularReferenceChecker   = circularReferenceChecker;
     _moBiFormulaTask            = moBiFormulaTask;
     _reactionDimensionRetriever = reactionDimensionRetriever;
     _contextMenuFactory         = contextMenuFactory;
     _userSettings           = userSettings;
     _dimensionFactory       = dimensionFactory;
     _context                = context;
     _activeSubjectRetriever = activeSubjectRetriever;
 }
 public EditDistributedParameterPresenter(IEditDistributedParameterView view, IEditTaskFor <IParameter> editTasks,
                                          IMoBiContext context, IDistributedParameterToDistributedParameterDTOMapper distributedParameterMapper,
                                          IDistributionFormulaFactory distributionFormulaFactory, IQuantityTask quantityTask, IFormulaToFormulaBuilderDTOMapper formulaMapper,
                                          IMoBiFormulaTask formulaTask, IParameterFactory parameterFactory, IInteractionTasksForParameter parameterTask) : base(view)
 {
     _editTasks = editTasks;
     _distributionFormulaFactory = distributionFormulaFactory;
     _quantityTask               = quantityTask;
     _formulaMapper              = formulaMapper;
     _formulaTask                = formulaTask;
     _parameterFactory           = parameterFactory;
     _parameterTask              = parameterTask;
     _distributedParameterMapper = distributedParameterMapper;
     _context = context;
 }
Example #22
0
 public ParameterStartValuesTask(
     IInteractionTaskContext interactionTaskContext,
     IEditTasksForBuildingBlock <IParameterStartValuesBuildingBlock> editTask,
     IParameterStartValuesCreator startValuesCreator,
     ICloneManagerForBuildingBlock cloneManagerForBuildingBlock,
     IImportedQuantityToParameterStartValueMapper dtoToQuantityToParameterStartValueMapper,
     IParameterResolver parameterResolver,
     IParameterStartValueBuildingBlockMergeManager parameterStartValueBuildingBlockMergeManager,
     IMoBiFormulaTask moBiFormulaTask,
     IMoBiSpatialStructureFactory spatialStructureFactory, IParameterStartValuePathTask parameterStartValuePathTask)
     : base(interactionTaskContext, editTask, parameterStartValueBuildingBlockMergeManager, cloneManagerForBuildingBlock, moBiFormulaTask, spatialStructureFactory, dtoToQuantityToParameterStartValueMapper, parameterStartValuePathTask)
 {
     _startValuesCreator = startValuesCreator;
     _parameterResolver  = parameterResolver;
 }
Example #23
0
 public InteractionTasksForPassiveTransportBuildingBlock(
     IInteractionTaskContext interactionTaskContext,
     IEditTasksForBuildingBlock <IPassiveTransportBuildingBlock> editTask,
     IInteractionTasksForBuilder <ITransportBuilder> builderTask,
     IMoleculeListTasks moleculeListTasks,
     IFormulaTask formulaTask,
     IPassiveTranportBuildingBlockMergeManager mergeIgnoreReplaceMergeManager,
     IMoBiFormulaTask moBiFormulaTask)
     : base(interactionTaskContext, editTask, builderTask)
 {
     _moleculeListTasks = moleculeListTasks;
     _formulaTask       = formulaTask;
     _mergeIgnoreReplaceMergeManager = mergeIgnoreReplaceMergeManager;
     _moBiFormulaTask = moBiFormulaTask;
 }
 public EditTableFormulaWithOffsetFormulaPresenter(
     IEditTableFormulaWithOffsetFormulaView view,
     ITableFormulaWithOffsetToTableFormulaWithOffsetDTOMapper mapper,
     IMoBiContext context,
     IMoBiFormulaTask moBiFormulaTask,
     IDisplayUnitRetriever displayUnitRetriever,
     IApplicationController applicationController,
     ISelectReferencePresenterFactory selectReferencePresenterFactory) : base(view, displayUnitRetriever)
 {
     _mapper                          = mapper;
     _moBiFormulaTask                 = moBiFormulaTask;
     _applicationController           = applicationController;
     _selectReferencePresenterFactory = selectReferencePresenterFactory;
     _timeDimension                   = context.DimensionFactory.Dimension(Constants.Dimension.TIME);
 }
Example #25
0
        protected override void Context()
        {
            _interactionTaskContext = A.Fake <IInteractionTaskContext>();
            _editTasks          = A.Fake <IEditTaskFor <IMoleculeBuilder> >();
            _calculation        = A.Fake <ICoreCalculationMethodRepository>();
            _dimensionRetriever = A.Fake <IReactionDimensionRetriever>();
            _parameterFactory   = A.Fake <IParameterFactory>();
            _formulaTask        = A.Fake <IMoBiFormulaTask>();
            sut = new InteractionTasksForMoleculeBuilder(_interactionTaskContext, _editTasks, _dimensionRetriever, _parameterFactory, _calculation, _formulaTask);

            _interactionTask = A.Fake <IInteractionTask>();
            _context         = A.Fake <IMoBiContext>();
            A.CallTo(() => _interactionTaskContext.InteractionTask).Returns(_interactionTask);
            A.CallTo(() => _interactionTaskContext.Context).Returns(_context);
        }
Example #26
0
 public Converter341To351(Converter541To551 coreConverter, ICloneManagerForSimulation cloneManager,
                          IParameterFactory parameterFactory, ISimulationSettingsFactory simulationSettingsFactory,
                          IObjectBaseFactory objectBaseFactory, IDistributionFormulaFactory distributionFormulaFactory,
                          IMoBiFormulaTask formulaTask, IDimensionFactory dimensionFactory, IObjectPathFactory objectPathFactory)
 {
     _coreConverter              = coreConverter;
     _cloneManager               = cloneManager;
     _parameterFactory           = parameterFactory;
     _simulationSettingsFactory  = simulationSettingsFactory;
     _objectBaseFactory          = objectBaseFactory;
     _distributionFormulaFactory = distributionFormulaFactory;
     _formulaTask       = formulaTask;
     _dimensionFactory  = dimensionFactory;
     _objectPathFactory = objectPathFactory;
 }
Example #27
0
 public MoleculeStartValuesTask(
     IInteractionTaskContext interactionTaskContext,
     IEditTasksForBuildingBlock <IMoleculeStartValuesBuildingBlock> editTask,
     IMoleculeStartValuesCreator startValuesCreator,
     IImportedQuantityToMoleculeStartValueMapper dtoMapper,
     IMoleculeStartValueBuildingBlockMergeManager startValueBuildingBlockMergeManager,
     ICloneManagerForBuildingBlock cloneManagerForBuildingBlock,
     IReactionDimensionRetriever dimensionRetriever,
     IMoBiFormulaTask moBiFormulaTask,
     IMoBiSpatialStructureFactory spatialStructureFactory, IMoleculeStartValuePathTask moleculeStartValuePathTask, IMoleculeResolver moleculeResolver)
     : base(interactionTaskContext, editTask, startValueBuildingBlockMergeManager, cloneManagerForBuildingBlock, moBiFormulaTask, spatialStructureFactory, dtoMapper, moleculeStartValuePathTask)
 {
     _startValuesCreator = startValuesCreator;
     _dimensionRetriever = dimensionRetriever;
     _moleculeResolver   = moleculeResolver;
 }
Example #28
0
 public EditExplicitFormulaPresenter(
     IEditExplicitFormulaView view,
     IExplicitFormulaToExplicitFormulaDTOMapper explicitFormulaMapper,
     IMoBiFormulaTask moBiFormulaTask,
     IReactionDimensionRetriever reactionDimensionRetriever,
     IDisplayUnitRetriever displayUnitRetriever,
     IEditFormulaPathListPresenter editFormulaPathListPresenter) : base(view, displayUnitRetriever)
 {
     _explicitFormulaMapper        = explicitFormulaMapper;
     _moBiFormulaTask              = moBiFormulaTask;
     _reactionDimensionRetriever   = reactionDimensionRetriever;
     _editFormulaPathListPresenter = editFormulaPathListPresenter;
     AddSubPresenters(_editFormulaPathListPresenter);
     _view.AddFormulaPathListView(_editFormulaPathListPresenter.BaseView);
     _editFormulaPathListPresenter.DragDropAllowedFor = DragDropAllowedFor;
 }
 public EditFormulaPathListPresenter(
     IEditFormulaPathListView view,
     IMoBiFormulaTask moBiFormulaTask,
     IMoBiContext context,
     IDimensionFactory dimensionFactory,
     IUserSettings userSettings,
     IViewItemContextMenuFactory contextMenuFactory,
     ICircularReferenceChecker circularReferenceChecker,
     IFormulaUsablePathToFormulaUsablePathDTOMapper formulaUsablePathDTOMapper) : base(view)
 {
     _moBiFormulaTask            = moBiFormulaTask;
     _context                    = context;
     _dimensionFactory           = dimensionFactory;
     _userSettings               = userSettings;
     _contextMenuFactory         = contextMenuFactory;
     _circularReferenceChecker   = circularReferenceChecker;
     _formulaUsablePathDTOMapper = formulaUsablePathDTOMapper;
 }
 protected override void Context()
 {
     _view = A.Fake <IEditExplicitFormulaView>();
     _explicitFormulaMapper  = A.Fake <IExplicitFormulaToExplicitFormulaDTOMapper>();
     _activeSubjectRetriever = A.Fake <IActiveSubjectRetriever>();
     _context                    = A.Fake <IMoBiContext>();
     _formulaChecker             = A.Fake <ICircularReferenceChecker>();
     _dialogCreator              = A.Fake <IDialogCreator>();
     _interactionTask            = A.Fake <IInteractionTasksForChildren <IFormula, IFormulaUsablePath> >();
     _reactionDimensionRetriever = A.Fake <IReactionDimensionRetriever>();
     _displayUnitRetriever       = A.Fake <IDisplayUnitRetriever>();
     _dimensionFactory           = A.Fake <IDimensionFactory>();
     _userSettings               = A.Fake <IUserSettings>();
     _viewItemContextMenuFactory = A.Fake <IViewItemContextMenuFactory>();
     _moBiFormulaTask            = A.Fake <IMoBiFormulaTask>();
     sut = new EditExplicitFormulaPresenter(_view, _explicitFormulaMapper, _activeSubjectRetriever, _context, _formulaChecker,
                                            _moBiFormulaTask, _reactionDimensionRetriever, _displayUnitRetriever, _viewItemContextMenuFactory, _userSettings, _dimensionFactory);
 }