示例#1
0
 public void EditCompoundParameters(IEnumerable <IParameter> compoundParameters)
 {
     _compoundTypeParameters = compoundParameters.Where(x => string.Equals(x.GroupName, CoreConstants.Groups.COMPOUND_PKA)).ToList();
     _parameterCache         = new PathCache <IParameter>(_entityPathResolver).For(_compoundTypeParameters);
     _compoundTypeDTO        = _dtoMapper.MapFrom(_compoundTypeParameters);
     _view.BindTo(_compoundTypeDTO.AllTypePKas);
     _editValueOriginPresenter.Edit(_compoundTypeParameters.FirstOrDefault());
 }
        public void EditCompoundParameters(IEnumerable <IParameter> compoundParameters)
        {
            var parameters = compoundParameters.ToList();

            _compoundTypeDTO = _dtoMapper.MapFrom(parameters);
            _parameterCache  = new PathCache <IParameter>(_entityPathResolver).For(parameters);
            _view.BindTo(_compoundTypeDTO.AllTypePKas);
        }
示例#3
0
        protected override void Context()
        {
            _entityPathResolver = A.Fake <IEntityPathResolver>();
            _view = A.Fake <ICompoundTypeGroupView>();
            _representationInfoRep = A.Fake <IRepresentationInfoRepository>();
            _mapper        = A.Fake <ICompoundToCompoundTypeDTOMapper>();
            _parameterTask = A.Fake <IParameterTask>();

            sut = new CompoundTypeGroupPresenter(_view, _representationInfoRep, _mapper, _parameterTask, _entityPathResolver);

            _parameters      = new List <IParameter>();
            _compoundTypeDTO = new CompoundTypeDTO();
            A.CallTo(() => _mapper.MapFrom(_parameters)).Returns(_compoundTypeDTO);
        }