Exemplo n.º 1
0
        public void UpdateTransporterFromTemplate(ITransporterExpressionContainer transporterContainer, string species, MembraneLocation membraneLocation, TransportType transportType)
        {
            //we need to retrieve the process name for the given MembraneTupe/Process Type combo
            var templateToUse = _transporterContainerTemplateRepository.TransportersFor(species, transporterContainer.Name)
                                .Where(x => x.MembraneLocation == membraneLocation)
                                .FirstOrDefault(x => x.TransportType == transportType);

            //That should never happen, otherwise we would have a transporter container with an unknown process
            if (templateToUse == null)
            {
                throw new PKSimException(PKSimConstants.Error.CouldNotFindTransporterFor(transporterContainer.Name, membraneLocation.ToString(), transportType.ToString()));
            }

            transporterContainer.UpdatePropertiesFrom(templateToUse);
        }
Exemplo n.º 2
0
 public void should_update_the_transporter_if_the_template_exists()
 {
    A.CallTo(() => _transporterContainer.UpdatePropertiesFrom(_transporterContainerTemplate)).MustHaveHappened();
 }