Esempio n. 1
0
        private SimulationEnzymaticProcessSelectionDTO mapFrom(SimulationPartialProcess simulationPartialProcess)
        {
            var dto = new SimulationEnzymaticProcessSelectionDTO(simulationPartialProcess);

            updateMetabliteSelectionFor(dto);
            return(dto);
        }
        protected override void Context()
        {
            base.Context();
            _partialProcess1Enzyme1 = A.Fake <SimulationPartialProcess>();
            _partialProcess1Enzyme1.CompoundProcess = new EnzymaticProcess {
                MetaboliteName = "Met1"
            };
            _partialProcess1Enzyme2 = A.Fake <SimulationPartialProcess>();
            _partialProcess1Enzyme2.CompoundProcess = new EnzymaticProcess {
                MetaboliteName = "Metabolite"
            };

            _partialProcesses.Add(_partialProcess1Enzyme1);
            _partialProcesses.Add(_partialProcess1Enzyme2);

            A.CallTo(() => _view.BindToPartialProcesses(A <IReadOnlyCollection <SimulationEnzymaticProcessSelectionDTO> > ._))
            .Invokes(x => _allPartialProcessDTO = x.GetArgument <IReadOnlyCollection <SimulationEnzymaticProcessSelectionDTO> >(0).ToList());

            _simulation.AddUsedBuildingBlock(new UsedBuildingBlock("Comp", PKSimBuildingBlockType.Compound)
            {
                BuildingBlock = _compound
            });
            _simulation.AddUsedBuildingBlock(new UsedBuildingBlock("Metabolite", PKSimBuildingBlockType.Compound)
            {
                BuildingBlock = new Compound().WithName("Metabolite")
            });
        }
        protected override void Context()
        {
            base.Context();
            _enzyme1 = new IndividualEnzyme {
                Name = "CYP3A4"
            };
            _enzyme2 = new IndividualEnzyme {
                Name = "CYP2D6"
            };
            _partialProcess1Enzyme1 = new SimulationPartialProcess {
                CompoundProcess = new EnzymaticProcess(), IndividualMolecule = _enzyme1
            };
            _partialProcess1Enzyme2 = new SimulationPartialProcess {
                CompoundProcess = new EnzymaticProcess(), IndividualMolecule = _enzyme2
            };
            _partialProcess1Enzyme3 = new SimulationPartialProcess {
                CompoundProcess = new EnzymaticProcess(), IndividualMolecule = _enzyme2
            };

            _partialProcesses.Add(_partialProcess1Enzyme1);
            _partialProcesses.Add(_partialProcess1Enzyme2);
            _partialProcesses.Add(_partialProcess1Enzyme3);

            A.CallTo(() => _view.BindToPartialProcesses(A <IReadOnlyCollection <SimulationEnzymaticProcessSelectionDTO> > ._))
            .Invokes(x => _allPartialProcessDTO = x.GetArgument <IReadOnlyCollection <SimulationEnzymaticProcessSelectionDTO> >(0).ToList());

            sut.EditProcessesIn(_simulation, _compoundProperties);
        }
        protected override void Context()
        {
            base.Context();
            _partialProcess1Enzyme1 = A.Fake <SimulationPartialProcess>();
            _partialProcess1Enzyme1.CompoundProcess = new EnzymaticProcess {
                MetaboliteName = "Met1"
            };
            _partialProcess1Enzyme2 = A.Fake <SimulationPartialProcess>();
            _partialProcess1Enzyme2.CompoundProcess = new EnzymaticProcess {
                MetaboliteName = "Metabolite"
            };

            _partialProcesses.Add(_partialProcess1Enzyme1);
            _partialProcesses.Add(_partialProcess1Enzyme2);

            _simulation.AddUsedBuildingBlock(new UsedBuildingBlock("Comp", PKSimBuildingBlockType.Compound)
            {
                BuildingBlock = _compound
            });
            _simulation.AddUsedBuildingBlock(new UsedBuildingBlock("Metabolite", PKSimBuildingBlockType.Compound)
            {
                BuildingBlock = new Compound().WithName("Metabolite")
            });

            sut.EditProcessesIn(_simulation, _compoundProperties);
        }
 protected override void Context()
 {
     base.Context();
     _partialProcessEnzyme = A.Fake <SimulationPartialProcess>();
     _partialProcesses.Add(_partialProcessEnzyme);
     _partialProcessEnzyme.CompoundProcess = _partialProcessRetriever.NotSelectedPartialProcess.DowncastTo <EnzymaticProcess>();
     _simulation.AddUsedBuildingBlock(new UsedBuildingBlock("Comp", PKSimBuildingBlockType.Compound)
     {
         BuildingBlock = _compound
     });
     sut.EditProcessesIn(_simulation, _compoundProperties);
 }
        protected override void Context()
        {
            base.Context();
            _partialProcess1Enzyme1 = A.Fake <SimulationPartialProcess>();
            _partialProcess1Enzyme1.CompoundProcess = new EnzymaticProcess {
                MetaboliteName = "Met1"
            };

            _partialProcesses.Add(_partialProcess1Enzyme1);
            _simulation.AddUsedBuildingBlock(new UsedBuildingBlock("Comp", PKSimBuildingBlockType.Compound)
            {
                BuildingBlock = _compound
            });
        }
Esempio n. 7
0
        public void AddPartialProcessMappingBaseOn(SimulationEnzymaticProcessSelectionDTO processSelectionDTO)
        {
            var currentSimulationPartialProcess = processSelectionDTO.SimulationPartialProcess;
            var newProcess = new SimulationPartialProcess
            {
                CompoundProcess    = _notSelectedPartialProcess,
                IndividualMolecule = currentSimulationPartialProcess.IndividualMolecule,
            };

            var newProcessDTO = mapFrom(newProcess);
            var insertIndex   = _allPartialProcessesDTO.IndexOf(processSelectionDTO);

            _allPartialProcessesDTO.Insert(insertIndex + 1, newProcessDTO);

            rebindPartialProcess();
        }
        protected override void Context()
        {
            base.Context();

            _compound.AddProcess(new SystemicProcess {
                Name = "PLS", InternalName = "PLS", SystemicProcessType = SystemicProcessTypes.Hepatic
            });
            _compound.AddProcess(new EnzymaticProcess {
                Name = "Partial", InternalName = "MM"
            });
            var simulationPartialProcess = new SimulationPartialProcess {
                CompoundProcess = new EnzymaticProcess {
                    MoleculeName = "MOL"
                }
            };

            A.CallTo(_partialProcessRetriever).WithReturnType <IReadOnlyList <SimulationPartialProcess> >().Returns(new[] { simulationPartialProcess });
        }
Esempio n. 9
0
 public SimulationPartialProcessSelectionDTO(SimulationPartialProcess simulationPartialProcess)
 {
     SimulationPartialProcess = simulationPartialProcess;
 }
Esempio n. 10
0
 public SimulationEnzymaticProcessSelectionDTO(SimulationPartialProcess enzymaticProcess)
     : base(enzymaticProcess)
 {
 }
Esempio n. 11
0
 private SimulationInteractionProcessSelectionDTO mapFrom(SimulationPartialProcess x)
 {
     return(new SimulationInteractionProcessSelectionDTO(x));
 }
 public SimulationInteractionProcessSelectionDTO(SimulationPartialProcess simulationPartialProcess) : base(simulationPartialProcess)
 {
 }