Ejemplo n.º 1
0
 public MolWeightGroupPresenter(IMolWeightGroupView view, IRepresentationInfoRepository representationInfoRepository, ICompoundToMolWeightDTOMapper molWeightDTOMapper,
                                IMolWeightHalogensPresenter molWeightHalogensPresenter, IParameterTask parameterTask) :
     base(view, representationInfoRepository, CoreConstants.Groups.COMPOUND_MW)
 {
     _molWeightDTOMapper         = molWeightDTOMapper;
     _molWeightHalogensPresenter = molWeightHalogensPresenter;
     _parameterTask = parameterTask;
     _view.SetHalogensView(_molWeightHalogensPresenter.View);
     _molWeightHalogensPresenter.StatusChanged += OnStatusChanged;
 }
 protected override void Context()
 {
     _commandRegister              = A.Fake <ICommandCollector>();
     _view                         = A.Fake <IMolWeightGroupView>();
     _parameterTask                = A.Fake <IParameterTask>();
     _molWeightsHalogenPresenters  = A.Fake <IMolWeightHalogensPresenter>();
     _molWeightDTOMapper           = A.Fake <ICompoundToMolWeightDTOMapper>();
     _representationInfoRepository = A.Fake <IRepresentationInfoRepository>();
     sut = new MolWeightGroupPresenter(_view, _representationInfoRepository, _molWeightDTOMapper, _molWeightsHalogenPresenters, _parameterTask);
     sut.InitializeWith(_commandRegister);
 }
Ejemplo n.º 3
0
 public MolWeightGroupPresenter(IMolWeightGroupView view,
                                IRepresentationInfoRepository representationInfoRepository,
                                ICompoundToMolWeightDTOMapper molWeightDTOMapper,
                                IMolWeightHalogensPresenter molWeightHalogensPresenter,
                                IParameterTask parameterTask,
                                IEditValueOriginPresenter editValueOriginPresenter) :
     base(view, representationInfoRepository, CoreConstants.Groups.COMPOUND_MW)
 {
     _molWeightDTOMapper         = molWeightDTOMapper;
     _molWeightHalogensPresenter = molWeightHalogensPresenter;
     _parameterTask            = parameterTask;
     _editValueOriginPresenter = editValueOriginPresenter;
     AddSubPresenters(_editValueOriginPresenter, _molWeightHalogensPresenter);
     _view.SetHalogensView(_molWeightHalogensPresenter.View);
     _view.AddValueOriginView(_editValueOriginPresenter.View);
     _editValueOriginPresenter.ValueOriginUpdated = valueOriginUpdated;
 }
Ejemplo n.º 4
0
        protected override void Context()
        {
            _commandRegister              = A.Fake <ICommandCollector>();
            _view                         = A.Fake <IMolWeightGroupView>();
            _parameterTask                = A.Fake <IParameterTask>();
            _molWeightsHalogenPresenters  = A.Fake <IMolWeightHalogensPresenter>();
            _molWeightDTOMapper           = A.Fake <ICompoundToMolWeightDTOMapper>();
            _representationInfoRepository = A.Fake <IRepresentationInfoRepository>();
            _editValueOriginPresenter     = A.Fake <IEditValueOriginPresenter>();
            sut = new MolWeightGroupPresenter(_view, _representationInfoRepository, _molWeightDTOMapper, _molWeightsHalogenPresenters, _parameterTask, _editValueOriginPresenter);
            sut.InitializeWith(_commandRegister);

            _molWeightParameter    = new PKSimParameter();
            _molWeightParameterEff = new PKSimParameter();

            _molWeightDTO = new MolWeightDTO
            {
                MolWeightParameter    = new ParameterDTO(_molWeightParameter),
                MolWeightEffParameter = new ParameterDTO(_molWeightParameterEff)
            };

            A.CallTo(_molWeightDTOMapper).WithReturnType <MolWeightDTO>().Returns(_molWeightDTO);
        }