public MoleculesAndReactionsCreator(IObjectBaseFactory objectBaseFactory, IMoleculeBuilderFactory moleculeBuilderFactory, IParameterIdUpdater parameterIdUpdater, IProcessToProcessBuilderMapper processBuilderMapper, IParameterSetUpdater parameterSetUpdater, IIndividualEnzymeFactory individualEnzymeFactory, IIndividualTransporterFactory individualTransporterFactory, IModelContainerMoleculeRepository modelContainerMoleculeRepo, IStaticReactionRepository staticReactionRepository, IMoleculeCalculationRetriever moleculeCalculationRetriever, IInteractionKineticUpdater interactionKineticUpdater, IInteractionTask interactionTask ) { _objectBaseFactory = objectBaseFactory; _moleculeBuilderFactory = moleculeBuilderFactory; _parameterIdUpdater = parameterIdUpdater; _processBuilderMapper = processBuilderMapper; _parameterSetUpdater = parameterSetUpdater; _individualEnzymeFactory = individualEnzymeFactory; _individualTransporterFactory = individualTransporterFactory; _modelContainerMoleculeRepo = modelContainerMoleculeRepo; _staticReactionRepository = staticReactionRepository; _moleculeCalculationRetriever = moleculeCalculationRetriever; _interactionKineticUpdater = interactionKineticUpdater; _interactionTask = interactionTask; _allMoleculeNames = new List <string>(); _moleculeWithTurnoverReactions = new List <IMoleculeBuilder>(); }
protected override void Context() { _spatialStructureFactory = A.Fake <IPKSimSpatialStructureFactory>(); _modelObserverQuery = A.Fake <IModelObserverQuery>(); _modelPassiveTransportQuery = A.Fake <IModelPassiveTransportQuery>(); _parameterStartValueCreator = A.Fake <IPKSimParameterStartValuesCreator>(); _moleculesAndReactionsCreator = A.Fake <IMoleculesAndReactionsCreator>(); _eventBuildingBlockCreator = A.Fake <IEventBuildingBlockCreator>(); _moleculeStartValueCreator = A.Fake <IPKSimMoleculeStartValuesCreator>(); _moleculeCalculationRetriever = A.Fake <IMoleculeCalculationRetriever>(); _distributedTableConverter = A.Fake <IDistributedParameterToTableParameterConverter>(); _parameterDefaultStateUpdater = A.Fake <IParameterDefaultStateUpdater>(); _cm1 = new CoreCalculationMethod(); _cm2 = new CoreCalculationMethod(); _simulation = new IndividualSimulation { Properties = new SimulationProperties() }; _simulation.SimulationSettings = new SimulationSettings(); _simulation.ModelConfiguration = new ModelConfiguration(); _individual = new Individual().WithName("MyIndividuyal"); _compound = A.Fake <Compound>().WithName("MyCompound"); _protocol = new SimpleProtocol().WithName("MyProtocol"); _spatialStructure = A.Fake <ISpatialStructure>(); _passiveTransportBuilingBlock = A.Fake <IPassiveTransportBuildingBlock>(); _observerBuildingBlock = A.Fake <IObserverBuildingBlock>(); _eventBuildingBlock = A.Fake <IEventGroupBuildingBlock>(); _parameterValuesBuildingBlock = A.Fake <IParameterStartValuesBuildingBlock>(); _moleculeStartValueBuildingBlock = A.Fake <IMoleculeStartValuesBuildingBlock>(); _simulation.AddUsedBuildingBlock(new UsedBuildingBlock("Individual", PKSimBuildingBlockType.Individual) { BuildingBlock = _individual }); _simulation.AddUsedBuildingBlock(new UsedBuildingBlock("Compound", PKSimBuildingBlockType.Compound) { BuildingBlock = _compound }); _simulation.AddUsedBuildingBlock(new UsedBuildingBlock("Protocol", PKSimBuildingBlockType.Protocol) { BuildingBlock = _protocol }); A.CallTo(() => _moleculeCalculationRetriever.AllMoleculeCalculationMethodsUsedBy(_simulation)).Returns(new[] { _cm1, _cm2 }); A.CallTo(() => _spatialStructureFactory.CreateFor(_individual, _simulation)).Returns(_spatialStructure); A.CallTo(() => _modelPassiveTransportQuery.AllPassiveTransportsFor(_simulation)).Returns(_passiveTransportBuilingBlock); A.CallTo(() => _modelObserverQuery.AllObserversFor(A <IMoleculeBuildingBlock> .Ignored, _simulation)).Returns(_observerBuildingBlock); A.CallTo(() => _eventBuildingBlockCreator.CreateFor(_simulation)).Returns(_eventBuildingBlock); A.CallTo(() => _parameterStartValueCreator.CreateFor(A <IBuildConfiguration> .Ignored, A <Simulation> .Ignored)).Returns(_parameterValuesBuildingBlock); A.CallTo(() => _moleculeStartValueCreator.CreateFor(A <IBuildConfiguration> .Ignored, A <Simulation> .Ignored)).Returns(_moleculeStartValueBuildingBlock); sut = new BuildConfigurationTask(_spatialStructureFactory, _modelObserverQuery, _modelPassiveTransportQuery, _parameterStartValueCreator, _moleculesAndReactionsCreator, _eventBuildingBlockCreator, _moleculeStartValueCreator, _moleculeCalculationRetriever, _distributedTableConverter, _parameterDefaultStateUpdater); }
public BuildConfigurationTask(IPKSimSpatialStructureFactory spatialStructureFactory, IModelObserverQuery modelObserverQuery, IModelPassiveTransportQuery modelPassiveTransportQuery, IPKSimParameterStartValuesCreator parameterStartValuesCreator, IMoleculesAndReactionsCreator moleculesAndReactionsCreator, IEventBuildingBlockCreator eventBuildingBlockCreator, IPKSimMoleculeStartValuesCreator moleculeStartValuesCreator, IMoleculeCalculationRetriever moleculeCalculationRetriever, IDistributedParameterToTableParameterConverter distributedParameterToTableParameterConverter) { _moleculeCalculationRetriever = moleculeCalculationRetriever; _distributedParameterToTableParameterConverter = distributedParameterToTableParameterConverter; _spatialStructureFactory = spatialStructureFactory; _modelObserverQuery = modelObserverQuery; _modelPassiveTransportQuery = modelPassiveTransportQuery; _parameterStartValuesCreator = parameterStartValuesCreator; _moleculesAndReactionsCreator = moleculesAndReactionsCreator; _eventBuildingBlockCreator = eventBuildingBlockCreator; _moleculeStartValuesCreator = moleculeStartValuesCreator; _moleculeCalculationRetriever = moleculeCalculationRetriever; }