protected override void Context()
 {
     _view            = A.Fake <IEditContainerView>();
     _containerMapper = A.Fake <IContainerToContainerDTOMapper>();
     _editTasks       = A.Fake <IEditTaskForContainer>();
     _parametersInContainerPresenter = A.Fake <IEditParametersInContainerPresenter>();
     _context       = A.Fake <IMoBiContext>();
     _tagsPresenter = A.Fake <ITagsPresenter>();
     sut            = new EditContainerPresenter(_view, _containerMapper, _editTasks, _parametersInContainerPresenter, _context, _tagsPresenter);
 }
Exemplo n.º 2
0
        public EditParameterPresenter(IEditParameterView view,
                                      IEditFormulaPresenter editValueFormulaPresenter,
                                      IParameterToParameterDTOMapper parameterMapper,
                                      IEditFormulaPresenter editRhsFormulaPresenter,
                                      IInteractionTaskContext interactionTaskContext,
                                      IGroupRepository groupRepository,
                                      IEditTaskFor <IParameter> editTasks,
                                      IInteractionTasksForParameter parameterTask,
                                      IContextSpecificReferencesRetriever contextSpecificReferencesRetriever,
                                      IFavoriteTask favoriteTask,
                                      IEditValueOriginPresenter editValueOriginPresenter,
                                      ITagsPresenter tagsPresenter,
                                      IDescriptorConditionListPresenter <IParameter> containerCriteriaPresenter)
            : base(view)
        {
            _editValueFormulaPresenter          = editValueFormulaPresenter;
            _parameterTask                      = parameterTask;
            _contextSpecificReferencesRetriever = contextSpecificReferencesRetriever;
            _favoriteTask               = favoriteTask;
            _editValueOriginPresenter   = editValueOriginPresenter;
            _tagsPresenter              = tagsPresenter;
            _containerCriteriaPresenter = containerCriteriaPresenter;
            _parameterMapper            = parameterMapper;
            _groupRepository            = groupRepository;
            _editTasks = editTasks;
            _editRHSFormulaPresenter = editRhsFormulaPresenter;
            _interactionTaskContext  = interactionTaskContext;
            _view.SetFormulaView(_editValueFormulaPresenter.BaseView);
            _view.AddRHSView(_editRHSFormulaPresenter.BaseView);
            _view.AddValueOriginView(_editValueOriginPresenter.BaseView);
            _view.AddTagsView(_tagsPresenter.BaseView);

            AddSubPresenters(editRhsFormulaPresenter, editValueFormulaPresenter, _editValueOriginPresenter, _tagsPresenter, _containerCriteriaPresenter);

            _editRHSFormulaPresenter.IsRHS = true;
            _editRHSFormulaPresenter.RemoveAllFormulaTypes();
            _editRHSFormulaPresenter.AddFormulaType <ConstantFormula>();
            _editRHSFormulaPresenter.AddFormulaType <ExplicitFormula>();
            _editRHSFormulaPresenter.SetDefaultFormulaType <ExplicitFormula>();
            ParameterBuildModes   = EnumHelper.AllValuesFor <ParameterBuildMode>();
            WarnOnBuildModeChange = true;
            _editValueOriginPresenter.ValueOriginUpdated += setValueOrigin;
            _editValueOriginPresenter.ShowCaption         = false;
        }
Exemplo n.º 3
0
 public EditContainerPresenter(
     IEditContainerView view,
     IContainerToContainerDTOMapper containerToDtoContainerMapper,
     IEditTaskForContainer editTasks,
     IEditParametersInContainerPresenter editParametersInContainerPresenter,
     IMoBiContext context,
     ITagsPresenter tagsPresenter)
     : base(view)
 {
     _containerToDTOContainerMapper = containerToDtoContainerMapper;
     _context       = context;
     _tagsPresenter = tagsPresenter;
     _editParametersInContainerPresenter = editParametersInContainerPresenter;
     _editTasks = editTasks;
     _view.AddParameterView(editParametersInContainerPresenter.BaseView);
     _view.AddTagsView(_tagsPresenter.BaseView);
     AddSubPresenters(_editParametersInContainerPresenter, _tagsPresenter);
     initParameterListPresenter();
 }
        protected override void Context()
        {
            _view = A.Fake <IEditParameterView>();
            _editFormulaPresenter    = A.Fake <IEditFormulaPresenter>();
            _parameterMapper         = A.Fake <IParameterToParameterDTOMapper>();
            _editRHSPresenter        = A.Fake <IEditFormulaPresenter>();
            _interactionTasksContext = A.Fake <IInteractionTaskContext>();
            _groupRepository         = A.Fake <IGroupRepository>();
            _editTasks                        = A.Fake <IEditTaskFor <IParameter> >();
            _favoriteTask                     = A.Fake <IFavoriteTask>();
            _parameterTask                    = A.Fake <IInteractionTasksForParameter>();
            _editValueOriginPresenter         = A.Fake <IEditValueOriginPresenter>();
            _tagsPresenter                    = A.Fake <ITagsPresenter>();
            _descriptorConditionListPresenter = A.Fake <IDescriptorConditionListPresenter <IParameter> >();

            _buildingBlock = A.Fake <IBuildingBlock>();

            sut = new EditParameterPresenter(
                _view,
                _editFormulaPresenter,
                _parameterMapper,
                _editRHSPresenter,
                _interactionTasksContext,
                _groupRepository,
                _editTasks,
                _parameterTask,
                new ContextSpecificReferencesRetriever(),
                _favoriteTask,
                _editValueOriginPresenter,
                _tagsPresenter,
                _descriptorConditionListPresenter)
            {
                BuildingBlock = _buildingBlock
            };

            _commandCollector = A.Fake <ICommandCollector>();
            sut.InitializeWith(_commandCollector);

            _parameter    = new Parameter().WithId("Para");
            _parameterDTO = new ParameterDTO(_parameter);
            A.CallTo(() => _parameterMapper.MapFrom(_parameter)).Returns(_parameterDTO);
        }
 public EditEventGroupPresenter(
     IEditEventGroupView view,
     IEditTaskFor <IEventGroupBuilder> editTask,
     IEditParametersInContainerPresenter parametersInContainerPresenter,
     IEventGroupBuilderToEventGroupBuilderDTOMapper eventGroupBuilderDTOMapper,
     IMoBiContext context,
     IDescriptorConditionListPresenter <IEventGroupBuilder> descriptorConditionListPresenter,
     ITagsPresenter tagsPresenter)
     : base(view)
 {
     _descriptorConditionListPresenter = descriptorConditionListPresenter;
     _tagsPresenter = tagsPresenter;
     _context       = context;
     _eventGroupBuilderDTOMapper     = eventGroupBuilderDTOMapper;
     _parametersInContainerPresenter = parametersInContainerPresenter;
     _view.AddParametersView(parametersInContainerPresenter.BaseView);
     _view.AddDescriptorConditionListView(_descriptorConditionListPresenter.View);
     _view.AddTagsView(_tagsPresenter.View);
     _editTask = editTask;
     AddSubPresenters(_parametersInContainerPresenter, _descriptorConditionListPresenter, _tagsPresenter);
 }
Exemplo n.º 6
0
 public void AttachPresenter(ITagsPresenter presenter)
 {
     _presenter = presenter;
 }