protected override void Context() { base.Context(); _simulation = A.Fake <Simulation>(); _mixedInhibition = new InhibitionProcess { InteractionType = InteractionType.MixedInhibition }.WithName("MixedInhibition"); _competitiveInhibition = new InhibitionProcess { InteractionType = InteractionType.CompetitiveInhibition }.WithName("CompetitiveInhibition"); _compound1 = new Compound().WithName("Compound1"); _compound2 = new Compound().WithName("Compound2"); _compound2.AddProcess(_mixedInhibition); _compound2.AddProcess(_competitiveInhibition); _interactionProperties = new InteractionProperties(); A.CallTo(() => _simulation.InteractionProperties).Returns(_interactionProperties); A.CallTo(() => _simulation.Compounds).Returns(new[] { _compound1, _compound2 }); _interactionProperties.AddInteraction(new InteractionSelection { MoleculeName = _moleculeName, ProcessName = _mixedInhibition.Name, CompoundName = _compound2.Name }); _interactionProperties.AddInteraction(new InteractionSelection { MoleculeName = _moleculeName, ProcessName = _competitiveInhibition.Name, CompoundName = _compound2.Name }); }
public override void GlobalContext() { base.GlobalContext(); _induction = _cloneManager.Clone(_compoundProcessRepository.ProcessByName(CoreConstantsForSpecs.Process.INDUCTION).DowncastTo <InductionProcess>()); _induction.Name = "Induction"; _induction.Parameter(CoreConstantsForSpecs.Parameter.EC50).Value = 10; _compound.AddProcess(_induction); _irreversibleInhibiton = _cloneManager.Clone(_compoundProcessRepository.ProcessByName(CoreConstantsForSpecs.Process.IRREVERSIBLE_INHIBITION).DowncastTo <InhibitionProcess>()); _irreversibleInhibiton.Name = "IrreversibleProcess"; _irreversibleInhibiton.Parameter(CoreConstantsForSpecs.Parameter.KINACT).Value = 10; _compound.AddProcess(_irreversibleInhibiton); _simulation = DomainFactoryForSpecs.CreateModelLessSimulationWith(_individual, new[] { _compound }, new[] { _protocol }) .DowncastTo <IndividualSimulation>(); _simulation.CompoundPropertiesFor(_compound.Name) .Processes .MetabolizationSelection .AddPartialProcessSelection(new EnzymaticProcessSelection { CompoundName = _compound.Name, ProcessName = _metabolizationProcess.Name, MoleculeName = _enzyme.Name }); _simulation.InteractionProperties.AddInteraction(new InteractionSelection { CompoundName = _compound.Name, MoleculeName = _enzyme.Name, ProcessName = _induction.Name }); _simulation.InteractionProperties.AddInteraction(new InteractionSelection { CompoundName = _compound.Name, MoleculeName = _enzyme.Name, ProcessName = _irreversibleInhibiton.Name }); DomainFactoryForSpecs.AddModelToSimulation(_simulation); }
protected override void Context() { _simulation = A.Fake <Simulation>(); _mixedInhibition1 = new InhibitionProcess { InteractionType = InteractionType.MixedInhibition }.WithName("MixedInhibition1"); _mixedInhibition2 = new InhibitionProcess { InteractionType = InteractionType.MixedInhibition }.WithName("MixedInhibition2"); _compound1 = new Compound().WithName("Compound1"); _compound2 = new Compound().WithName("Compound2"); _compound2.AddProcess(_mixedInhibition1); _compound2.AddProcess(_mixedInhibition2); _interactionProperties = new InteractionProperties(); A.CallTo(() => _simulation.InteractionProperties).Returns(_interactionProperties); A.CallTo(() => _simulation.Compounds).Returns(new[] { _compound1, _compound2 }); sut = new MixedInhibitionKineticUpdaterSpecification(new ObjectPathFactoryForSpecs(), A.Fake <IDimensionRepository>(), new InteractionTask()); _interactionProperties.AddInteraction(new InteractionSelection { MoleculeName = _moleculeName, ProcessName = _mixedInhibition1.Name, CompoundName = _compound2.Name }); _interactionProperties.AddInteraction(new InteractionSelection { MoleculeName = _moleculeName, ProcessName = _mixedInhibition2.Name, CompoundName = _compound2.Name }); }
protected override void Context() { base.Context(); _interactionProperties = new InteractionProperties(); var inhibitionProcess = new InhibitionProcess().WithName("Proc"); _compound.AddProcess(inhibitionProcess); _compoundProperties = new CompoundProperties(); }
protected override void Context() { base.Context(); _interactionProperties = new InteractionProperties(); var inhibitionProcess = new InhibitionProcess { InteractionType = InteractionType.CompetitiveInhibition }.WithName("Proc"); var interaction = new InteractionSelection { CompoundName = _compound.Name, ProcessName = inhibitionProcess.Name }; _compound.AddProcess(inhibitionProcess); _interactionProperties.AddInteraction(interaction); _compoundProperties = new CompoundProperties(); }
protected override void Context() { _simulation = A.Fake <Simulation>(); _irreversibleInhibition1 = new InhibitionProcess { InteractionType = InteractionType.IrreversibleInhibition }.WithName("IrreversibleInhibition1"); _irreversibleInhibition2 = new InhibitionProcess { InteractionType = InteractionType.IrreversibleInhibition }.WithName("IrreversibleInhibition2"); _uncompetitiveInhibition = new InhibitionProcess { InteractionType = InteractionType.UncompetitiveInhibition }.WithName("UncompetitiveInhibition"); _compound1 = new Compound().WithName("Compound1"); _compound1.AddProcess(_irreversibleInhibition1); _compound1.AddProcess(_uncompetitiveInhibition); _compound2 = new Compound().WithName("Compound2"); _compound2.AddProcess(_irreversibleInhibition2); _interactionProperties = new InteractionProperties(); A.CallTo(() => _simulation.InteractionProperties).Returns(_interactionProperties); A.CallTo(() => _simulation.Compounds).Returns(new[] { _compound1, _compound2 }); _objectPathFactory = new ObjectPathFactoryForSpecs(); _dimensionRepository = A.Fake <IDimensionRepository>(); _interactionTask = new InteractionTask(); sut = new IrreversibleInhibitionKineticUpdaterSpecification(_objectPathFactory, _dimensionRepository, _interactionTask); _interactionProperties.AddInteraction(new InteractionSelection { MoleculeName = _moleculeName, ProcessName = _irreversibleInhibition1.Name, CompoundName = _compound1.Name }); _interactionProperties.AddInteraction(new InteractionSelection { MoleculeName = _moleculeName, ProcessName = _irreversibleInhibition2.Name, CompoundName = _compound2.Name }); _interactionProperties.AddInteraction(new InteractionSelection { MoleculeName = _moleculeName, ProcessName = _uncompetitiveInhibition.Name, CompoundName = _compound2.Name }); }
protected override void Context() { base.Context(); _moleculeMappable = new IndividualEnzyme().WithName("MoleculeMapped"); _moleculeAlreadySelected = new IndividualEnzyme().WithName("MoleculeAlreadySelected"); _moleculeNotMapped = new IndividualEnzyme().WithName("MoleculeNotMapped"); _inhibitionProcess1 = new InhibitionProcess().WithName("InhibitionProcess1"); _inhibitionProcess2 = new InhibitionProcess().WithName("InhibitionProcess2"); _inductionProcess1 = new InductionProcess().WithName("InductionProcess1"); _inhibitionProcess3 = new InhibitionProcess().WithName("InhibitionProcess3"); _individual.AddMolecule(_moleculeNotMapped); _individual.AddMolecule(_moleculeMappable); _individual.AddMolecule(_moleculeAlreadySelected); _compound.AddProcess(_inhibitionProcess1); _compound2 = new Compound().WithName("Comp2"); _compound2.AddProcess(_inhibitionProcess2); _inhibitionProcess2.MoleculeName = _moleculeMappable.Name; _compound2.AddProcess(_inhibitionProcess3); _inhibitionProcess3.MoleculeName = _moleculeMappable.Name; _compound2.AddProcess(_inductionProcess1); _inductionProcess1.MoleculeName = _moleculeMappable.Name; var interactionProperties = new InteractionProperties(); interactionProperties.AddInteraction(new InteractionSelection { MoleculeName = _moleculeAlreadySelected.Name, ProcessName = _inhibitionProcess1.Name, CompoundName = _compound.Name }); A.CallTo(() => _simulation.InteractionProperties).Returns(interactionProperties); A.CallTo(() => _simulation.Compounds).Returns(new[] { _compound, _compound2 }); }