Beispiel #1
0
 public SimulationCompoundProtocolFormulationPresenter(ISimulationCompoundProtocolFormulationView view,
                                                       IFormulationTask formulationTask,
                                                       IFormulationMappingDTOToFormulationMappingMapper formulationMappingMapper,
                                                       IFormulationFromMappingRetriever formulationFromMappingRetriever, IBuildingBlockSelectionDisplayer buildingBlockSelectionDisplayer)
     : base(view)
 {
     _formulationTask                 = formulationTask;
     _formulationMappingMapper        = formulationMappingMapper;
     _formulationFromMappingRetriever = formulationFromMappingRetriever;
     _buildingBlockSelectionDisplayer = buildingBlockSelectionDisplayer;
 }
        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);
        }