public override void GlobalContext() { base.GlobalContext(); _transporterContainerTemplateRepository = IoC.Resolve <ITransporterContainerTemplateRepository>(); var allTransporters = _transporterContainerTemplateRepository.TransportersFor(_individual.Species.Name, CoreConstants.Organ.Brain); var influxBBB = allTransporters.Where(x => x.MembraneLocation == MembraneLocation.BloodBrainBarrier) .FirstOrDefault(x => x.TransportType == TransportType.Influx); _transporter = _transporterFactory.CreateFor(_individual).DowncastTo <IndividualTransporter>().WithName("TRANS"); var transportContainer = _transporter.ExpressionContainer(CoreConstants.Organ.Brain).DowncastTo <TransporterExpressionContainer>(); transportContainer.UpdatePropertiesFrom(influxBBB); _individual.AddMolecule(_transporter); _transportProcess = _cloneManager.Clone(_compoundProcessRepository.ProcessByName(CoreConstantsForSpecs.Process.ACTIVE_TRANSPORT_SPECIFIC_MM) .DowncastTo <PartialProcess>()); _transportProcess.Name = "My Transport Process"; _compound.AddProcess(_transportProcess); _simulation = DomainFactoryForSpecs.CreateModelLessSimulationWith(_individual, _compound, _protocol) .DowncastTo <IndividualSimulation>(); _simulation.CompoundPropertiesList.First() .Processes .TransportAndExcretionSelection .AddPartialProcessSelection(new EnzymaticProcessSelection { CompoundName = _compound.Name, ProcessName = _transportProcess.Name, MoleculeName = _transporter.Name }); DomainFactoryForSpecs.AddModelToSimulation(_simulation); }
public void should_add_the_relative_expression_to_periportal_and_pericentral_and_set_the_value_to_100() { _undefined.ExpressionContainer(CoreConstants.Compartment.Pericentral).RelativeExpression.ShouldBeEqualTo(100); _undefined.ExpressionContainer(CoreConstants.Compartment.Periportal).RelativeExpression.ShouldBeEqualTo(100); }