Ejemplo n.º 1
0
 public SimulationCompoundProtocolFormulationPresenter(ISimulationCompoundProtocolFormulationView view,
                                                       IFormulationTask formulationTask,
                                                       IFormulationMappingDTOToFormulationMappingMapper formulationMappingMapper,
                                                       IFormulationFromMappingRetriever formulationFromMappingRetriever, IBuildingBlockSelectionDisplayer buildingBlockSelectionDisplayer)
     : base(view)
 {
     _formulationTask                 = formulationTask;
     _formulationMappingMapper        = formulationMappingMapper;
     _formulationFromMappingRetriever = formulationFromMappingRetriever;
     _buildingBlockSelectionDisplayer = buildingBlockSelectionDisplayer;
 }
Ejemplo n.º 2
0
 public EventBuildingBlockCreator(IObjectBaseFactory objectBaseFactory,
                                  IProtocolToSchemaItemsMapper schemaItemsMapper,
                                  IApplicationFactory applicationFactory,
                                  IFormulationFromMappingRetriever formulationFromMappingRetriever,
                                  ICloneManagerForBuildingBlock cloneManagerForBuildingBlock,
                                  IParameterIdUpdater parameterIdUpdater,
                                  IParameterSetUpdater parameterSetUpdater,
                                  IEventGroupRepository eventGroupRepository)
 {
     _objectBaseFactory  = objectBaseFactory;
     _schemaItemsMapper  = schemaItemsMapper;
     _applicationFactory = applicationFactory;
     _formulationFromMappingRetriever = formulationFromMappingRetriever;
     _cloneManagerForBuildingBlock    = cloneManagerForBuildingBlock;
     _parameterIdUpdater   = parameterIdUpdater;
     _parameterSetUpdater  = parameterSetUpdater;
     _eventGroupRepository = eventGroupRepository;
 }
        protected override void Context()
        {
            _view                            = A.Fake <ISimulationCompoundProtocolFormulationView>();
            _formulationTask                 = A.Fake <IFormulationTask>();
            _formulationMappingMapper        = A.Fake <IFormulationMappingDTOToFormulationMappingMapper>();
            _formulationFromMappingRetriever = A.Fake <IFormulationFromMappingRetriever>();
            _formulation1                    = new Formulation();
            _formulation2                    = new Formulation();
            _protocol                        = A.Fake <Protocol>();
            _compound                        = A.Fake <Compound>();
            _simulation                      = A.Fake <Simulation>();
            _protocolProperties              = A.Fake <ProtocolProperties>();
            var compoundProperties = new CompoundProperties();

            A.CallTo(() => _simulation.CompoundPropertiesFor(_compound)).Returns(compoundProperties);
            compoundProperties.ProtocolProperties = _protocolProperties;
            _protocolProperties.Protocol          = _protocol;
            A.CallTo(() => _formulationTask.All()).Returns(new[] { _formulation1, _formulation2 });
            _buildingBlockSelectionDisplayer = A.Fake <IBuildingBlockSelectionDisplayer>();
            sut = new SimulationCompoundProtocolFormulationPresenter(_view, _formulationTask, _formulationMappingMapper, _formulationFromMappingRetriever, _buildingBlockSelectionDisplayer);
        }
Ejemplo n.º 4
0
 public SimulationBuildingBlockUpdater(IBuildingBlockToUsedBuildingBlockMapper buildingBlockMapper, IFormulationFromMappingRetriever formulationFromMappingRetriever)
 {
     _buildingBlockMapper             = buildingBlockMapper;
     _formulationFromMappingRetriever = formulationFromMappingRetriever;
 }
 protected override void Context()
 {
     _buildingBlockMapper         = A.Fake <IBuildingBlockToUsedBuildingBlockMapper>();
     _formulationMappingRetriever = A.Fake <IFormulationFromMappingRetriever>();
     sut = new SimulationBuildingBlockUpdater(_buildingBlockMapper, _formulationMappingRetriever);
 }