示例#1
0
 public QuantityPathToQuantityDisplayPathMapper(IObjectPathFactory objectPathFactory, IPathToPathElementsMapper pathToPathElementsMapper,
                                                IDataColumnToPathElementsMapper dataColumnToPathElementsMapper)
 {
     _objectPathFactory              = objectPathFactory;
     _pathToPathElementsMapper       = pathToPathElementsMapper;
     _dataColumnToPathElementsMapper = dataColumnToPathElementsMapper;
 }
        protected override void Context()
        {
            _objectPathFactory              = A.Fake <IObjectPathFactory>();
            _pathToPathElementMapper        = A.Fake <IPathToPathElementsMapper>();
            _dataColumnToPathElementsMapper = A.Fake <IDataColumnToPathElementsMapper>();

            sut = new QuantityPathToQuantityDisplayPathMapper(_objectPathFactory, _pathToPathElementMapper, _dataColumnToPathElementsMapper);
        }
 protected override void Context()
 {
     _formulaMapper            = A.Fake <IFormulaToFormulaBuilderDTOMapper>();
     _groupRepository          = A.Fake <IGroupRepository>();
     _favoriteRepository       = A.Fake <IFavoriteRepository>();
     _entityPathResolver       = A.Fake <IEntityPathResolver>();
     _pathToPathElementsMapper = A.Fake <IPathToPathElementsMapper>();
     sut = new ParameterToParameterDTOMapper(_formulaMapper, _groupRepository, _favoriteRepository, _entityPathResolver, _pathToPathElementsMapper);
 }
 protected override void Context()
 {
     _parameter                    = DomainHelperForSpecs.ConstantParameterWithValue(10);
     _formulaTypeMapper            = A.Fake <IFormulaToFormulaTypeMapper>();
     _representationInfoRepository = A.Fake <IRepresentationInfoRepository>();
     _entityPathResolver           = A.Fake <IEntityPathResolver>();
     _favoriteRepository           = A.Fake <IFavoriteRepository>();
     _pathToPathElementsMapper     = A.Fake <IPathToPathElementsMapper>();
     sut = new ParameterToParameterDTOMapper(_representationInfoRepository, _formulaTypeMapper, _pathToPathElementsMapper, _favoriteRepository, _entityPathResolver);
 }
示例#5
0
 public ParameterToParameterDTOMapper(IRepresentationInfoRepository representationInfoRepository, IFormulaToFormulaTypeMapper formulaTypeMapper,
                                      IPathToPathElementsMapper parameterDisplayPathMapper, IFavoriteRepository favoriteRepository,
                                      IEntityPathResolver entityPathResolver)
 {
     _representationInfoRepository  = representationInfoRepository;
     _formulaTypeMapper             = formulaTypeMapper;
     _parameterDisplayPathMapper    = parameterDisplayPathMapper;
     _favoriteRepository            = favoriteRepository;
     _entityPathResolver            = entityPathResolver;
     _parameterNameWithListOfValues = new List <string>(CoreConstants.Parameter.AllWithListOfValues);
 }
 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;
 }
示例#7
0
 public ParameterToParameterDTOMapper(IFormulaToFormulaBuilderDTOMapper formulaToDTOFormulaBuilderMapper,
                                      IGroupRepository groupRepository,
                                      IFavoriteRepository favoriteRepository,
                                      IEntityPathResolver entityPathResolver,
                                      IPathToPathElementsMapper pathToPathElementsMapper)
 {
     _formulaToDTOFormulaBuilderMapper = formulaToDTOFormulaBuilderMapper;
     _groupRepository          = groupRepository;
     _favoriteRepository       = favoriteRepository;
     _entityPathResolver       = entityPathResolver;
     _pathToPathElementsMapper = pathToPathElementsMapper;
 }
      protected override void Context()
      {
         _objectPathFactory = new ObjectPathFactoryForSpecs();
         _dataColumnToPathElementsMapper = A.Fake<IDataColumnToPathElementsMapper>();
         _pathToPathElementsMapper = A.Fake<IPathToPathElementsMapper>();
         sut = new PKSimQuantityPathToQuantityDisplayPathMapper(_objectPathFactory, _pathToPathElementsMapper, _dataColumnToPathElementsMapper);

         _root = new Container().WithName("ROOT");
         var baseGrid = new BaseGrid("Time", DomainHelperForSpecs.TimeDimensionForSpecs());
         _column = new DataColumn("Conc", DomainHelperForSpecs.ConcentrationDimensionForSpecs(), baseGrid);
         _individualSimulation = new IndividualSimulation {Model = new Model {Root = _root}};
      }
        protected override void Context()
        {
            _pathToPathElementMapper = A.Fake <IPathToPathElementsMapper>();
            _displayNameProvider     = A.Fake <IDisplayNameProvider>();
            _container    = new Container().WithName("ROOT");
            _pathElements = new PathElements();
            sut           = new DiffItemToDiffItemDTOMapper(_pathToPathElementMapper, _displayNameProvider);

            A.CallTo(() => _pathToPathElementMapper.MapFrom(_container)).Returns(_pathElements);
            A.CallTo(() => _displayNameProvider.DisplayNameFor(A <object> ._)).ReturnsLazily(x =>
            {
                var obj = x.GetArgument <object>(0);
                return(obj != null ? obj.ToString() : string.Empty);
            });
        }
示例#10
0
 public ParameterToParameterDTOMapper(
     IRepresentationInfoRepository representationInfoRepository,
     IFormulaToFormulaTypeMapper formulaTypeMapper,
     IPathToPathElementsMapper parameterDisplayPathMapper,
     IFavoriteRepository favoriteRepository,
     IEntityPathResolver entityPathResolver,
     IParameterListOfValuesRetriever parameterListOfValuesRetriever)
 {
     _representationInfoRepository   = representationInfoRepository;
     _formulaTypeMapper              = formulaTypeMapper;
     _parameterDisplayPathMapper     = parameterDisplayPathMapper;
     _favoriteRepository             = favoriteRepository;
     _entityPathResolver             = entityPathResolver;
     _parameterListOfValuesRetriever = parameterListOfValuesRetriever;
 }
示例#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");
        }
 protected override void Context()
 {
     _pathToPathElementsMapper = A.Fake <IPathToPathElementsMapper>();
     _entityPathResolver       = A.Fake <IEntityPathResolver>();
     sut = new QuantityToQuantitySelectionDTOMapper(_entityPathResolver, _pathToPathElementsMapper);
 }
 public RQuantityPathToQuantityDisplayPathMapper(IObjectPathFactory objectPathFactory, IPathToPathElementsMapper pathToPathElementsMapper,
                                                 IDataColumnToPathElementsMapper dataColumnToPathElementsMapper) : base(objectPathFactory, pathToPathElementsMapper,
                                                                                                                        dataColumnToPathElementsMapper)
 {
 }
 public PKSimDataColumnToPathElementsMapper(IPathToPathElementsMapper pathToPathElementsMapper) : base(pathToPathElementsMapper)
 {
 }
 public DataColumnToPathElementsMapper(IPathToPathElementsMapper pathToPathElementsMapper)
 {
     _pathToPathElementsMapper = pathToPathElementsMapper;
 }
 public DiffItemToDiffItemDTOMapper(IPathToPathElementsMapper pathElementsMapper, IDisplayNameProvider displayNameProvider)
 {
     _pathElementsMapper  = pathElementsMapper;
     _displayNameProvider = displayNameProvider;
 }
示例#17
0
 public MoBiQuantityPathToQuantityDisplayPathMapper(IObjectPathFactory objectPathFactory, IPathToPathElementsMapper pathToPathElementsMapper, IDataColumnToPathElementsMapper dataColumnToPathElementsMapper, IUserSettings userSettings) :
     base(objectPathFactory, pathToPathElementsMapper, dataColumnToPathElementsMapper)
 {
     _userSettings = userSettings;
 }
示例#18
0
 public QuantityToQuantitySelectionDTOMapper(IEntityPathResolver entityPathResolver, IPathToPathElementsMapper pathToPathElementsMapper)
 {
     _entityPathResolver       = entityPathResolver;
     _pathToPathElementsMapper = pathToPathElementsMapper;
 }